diff --git a/core/modules/migrate/src/Plugin/migrate/process/Migration.php b/core/modules/migrate/src/Plugin/migrate/process/Migration.php index 0fb0dc9..dcec0f6 100644 --- a/core/modules/migrate/src/Plugin/migrate/process/Migration.php +++ b/core/modules/migrate/src/Plugin/migrate/process/Migration.php @@ -122,6 +122,14 @@ public function transform($value, MigrateExecutable $migrate_executable, Row $ro foreach (array_keys($source_ids) as $index => $source_id) { $values[$source_id] = $source_id_values[$migration->id()][$index]; } + // If we have constants in the source then add them to the values and the + // process array. + if (isset($migration->get('source')['constants'])) { + $constants = $migration->get('source')['constants']; + $values += $constants; + $process += array_combine(array_keys($constants), array_keys($constants)); + } + $stub_row = new Row($values, $source_ids); $stub_row->stub(TRUE); // Do a normal migration with the stub row.