Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
migrate_plus
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
migrate_plus
Commits
305de128
Commit
305de128
authored
3 years ago
by
Ivan Doroshenko
Committed by
Lucas Hedding
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Check if shared_configuration key is used in migration
parent
028a0a14
No related branches found
No related tags found
1 merge request
!25
Check if shared_configuration key is used in migration
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
migrate_plus.module
+1
-1
1 addition, 1 deletion
migrate_plus.module
tests/src/Kernel/MigrationGroupTest.php
+3
-1
3 additions, 1 deletion
tests/src/Kernel/MigrationGroupTest.php
with
4 additions
and
2 deletions
migrate_plus.module
+
1
−
1
View file @
305de128
...
...
@@ -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).
...
...
This diff is collapsed.
Click to expand it.
tests/src/Kernel/MigrationGroupTest.php
+
3
−
1
View file @
305de128
...
...
@@ -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'
=>
[
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment