diff --git a/core/modules/migrate/src/Entity/Migration.php b/core/modules/migrate/src/Entity/Migration.php index 0791750..2c14c3a 100644 --- a/core/modules/migrate/src/Entity/Migration.php +++ b/core/modules/migrate/src/Entity/Migration.php @@ -78,6 +78,9 @@ class Migration extends ConfigEntityBase implements MigrationInterface, Requirem /** * The configuration describing the process plugins. * + * This is a strictly internal property and should not returned to calling + * code, use getProcess() instead. + * * @var array */ protected $process; @@ -393,7 +396,7 @@ public function isComplete() { * {@inheritdoc} */ public function getProcess() { - return $this->process; + return $this->getProcessNormalized($this->process); } /** @@ -408,7 +411,7 @@ public function setProcess(array $process) { * {@inheritdoc} */ public function setProcessOfProperty($field_name, $process) { - $this->process = $this->getProcessNormalized([$field_name => $process]) + $this->process; + $this->process[$field_name] = $process; return $this; } @@ -418,8 +421,9 @@ public function setProcessOfProperty($field_name, $process) { public function mergeProcessOfProperty($field_name, array $process) { // If we already have a process value then merge the incoming process array //otherwise simply set it. - if (isset($this->process[$field_name])) { - $this->process = NestedArray::mergeDeepArray([$this->process, $this->getProcessNormalized([$field_name => $process])], TRUE); + $current_process = $this->getProcess(); + if (isset($current_process[$field_name])) { + $this->process = NestedArray::mergeDeepArray([$current_process, $this->getProcessNormalized([$field_name => $process])], TRUE); } else { $this->setProcessOfProperty($field_name, $process);