From 743957c421b84df241c07d9f2eb8902af89893d4 Mon Sep 17 00:00:00 2001 From: Nathaniel Catchpole Date: Fri, 21 Mar 2014 10:53:43 +0000 Subject: [PATCH] Issue #2221767 by alexpott: Migration configuration entities should not use the dependencies key. --- .../lib/Drupal/migrate/Entity/Migration.php | 2 +- .../migrate/MigrationStorageController.php | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/core/modules/migrate/lib/Drupal/migrate/Entity/Migration.php b/core/modules/migrate/lib/Drupal/migrate/Entity/Migration.php index 06341696bc2..a1bacdcd70c 100644 --- a/core/modules/migrate/lib/Drupal/migrate/Entity/Migration.php +++ b/core/modules/migrate/lib/Drupal/migrate/Entity/Migration.php @@ -186,7 +186,7 @@ class Migration extends ConfigEntityBase implements MigrationInterface, Requirem * * @var array */ - public $dependencies = array(); + public $migration_dependencies = array(); /** * {@inheritdoc} diff --git a/core/modules/migrate/lib/Drupal/migrate/MigrationStorageController.php b/core/modules/migrate/lib/Drupal/migrate/MigrationStorageController.php index 1cd85617939..4b9b0addd6f 100644 --- a/core/modules/migrate/lib/Drupal/migrate/MigrationStorageController.php +++ b/core/modules/migrate/lib/Drupal/migrate/MigrationStorageController.php @@ -19,12 +19,12 @@ class MigrationStorageController extends ConfigStorageController implements Migr * {@inheritdoc} */ public function buildDependencyMigration(array $migrations, array $dynamic_ids) { - // Dependencies defined in the migration storage controller can be soft - // dependencies: if a soft dependency does not run, the current migration - // is still OK to go. This is indicated by adding ": false" (without - // quotes) after the name of the dependency. Hard dependencies (default) - // are called requirements. Both hard and soft dependencies (if run at - // all) must run before the current one. + // Migration dependencies defined in the migration storage controller can be + // soft dependencies: if a soft dependency does not run, the current + // migration is still OK to go. This is indicated by adding ": false" + // (without quotes) after the name of the dependency. Hard dependencies + // (default) are called requirements. Both hard and soft dependencies (if + // run at all) must run before the current one. $dependency_graph = array(); $requirement_graph = array(); $different = FALSE; @@ -33,8 +33,8 @@ class MigrationStorageController extends ConfigStorageController implements Migr $id = $migration->id(); $requirements[$id] = array(); $dependency_graph[$id]['edges'] = array(); - if (isset($migration->dependencies) && is_array($migration->dependencies)) { - foreach ($migration->dependencies as $dependency) { + if (isset($migration->migration_dependencies) && is_array($migration->migration_dependencies)) { + foreach ($migration->migration_dependencies as $dependency) { if (is_string($dependency) && !isset($dynamic_ids[$dependency])) { $this->addDependency($requirement_graph, $id, $dependency, $dynamic_ids); }