Skip to content
Snippets Groups Projects
Commit 305de128 authored by Ivan Doroshenko's avatar Ivan Doroshenko Committed by Lucas Hedding
Browse files

Check if shared_configuration key is used in migration

parent 028a0a14
No related branches found
No related tags found
1 merge request!25Check if shared_configuration key is used in migration
......@@ -61,7 +61,7 @@ function migrate_plus_migration_plugins_alter(array &$migrations) {
continue;
}
foreach ($shared_configuration as $key => $group_value) {
$migration_value = $migrations[$id][$key];
$migration_value = $migrations[$id][$key] ?? NULL;
// Where both the migration and the group provide arrays, replace
// recursively (so each key collision is resolved in favor of the
// migration).
......
......@@ -30,6 +30,7 @@ class MigrationGroupTest extends KernelTestBase {
'shared_configuration' => [
// In migration, so will be overridden.
'migration_tags' => ['Drupal 6'],
'audit' => TRUE,
'source' => [
'constants' => [
// Not in migration, so will be added.
......@@ -52,7 +53,7 @@ class MigrationGroupTest extends KernelTestBase {
'load' => [],
'migration_group' => $group_id,
'label' => 'Unaffected by the group',
// Overrides group.
// Overrides group.
'migration_tags' => ['Drupal 7'],
'destination' => [],
'source' => [],
......@@ -74,6 +75,7 @@ class MigrationGroupTest extends KernelTestBase {
$expected_config = [
'label' => 'Unaffected by the group',
'getMigrationTags' => ['Drupal 7'],
'isAuditable' => TRUE,
'getSourceConfiguration' => [
'plugin' => 'empty',
'constants' => [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment