Issue #2221767 by alexpott: Migration configuration entities should not use the dependencies key.

8.0.x
Nathaniel Catchpole 2014-03-21 10:53:43 +00:00
parent 23902766ac
commit 743957c421
2 changed files with 9 additions and 9 deletions

View File

@ -186,7 +186,7 @@ class Migration extends ConfigEntityBase implements MigrationInterface, Requirem
* *
* @var array * @var array
*/ */
public $dependencies = array(); public $migration_dependencies = array();
/** /**
* {@inheritdoc} * {@inheritdoc}

View File

@ -19,12 +19,12 @@ class MigrationStorageController extends ConfigStorageController implements Migr
* {@inheritdoc} * {@inheritdoc}
*/ */
public function buildDependencyMigration(array $migrations, array $dynamic_ids) { public function buildDependencyMigration(array $migrations, array $dynamic_ids) {
// Dependencies defined in the migration storage controller can be soft // Migration dependencies defined in the migration storage controller can be
// dependencies: if a soft dependency does not run, the current migration // soft dependencies: if a soft dependency does not run, the current
// is still OK to go. This is indicated by adding ": false" (without // migration is still OK to go. This is indicated by adding ": false"
// quotes) after the name of the dependency. Hard dependencies (default) // (without quotes) after the name of the dependency. Hard dependencies
// are called requirements. Both hard and soft dependencies (if run at // (default) are called requirements. Both hard and soft dependencies (if
// all) must run before the current one. // run at all) must run before the current one.
$dependency_graph = array(); $dependency_graph = array();
$requirement_graph = array(); $requirement_graph = array();
$different = FALSE; $different = FALSE;
@ -33,8 +33,8 @@ class MigrationStorageController extends ConfigStorageController implements Migr
$id = $migration->id(); $id = $migration->id();
$requirements[$id] = array(); $requirements[$id] = array();
$dependency_graph[$id]['edges'] = array(); $dependency_graph[$id]['edges'] = array();
if (isset($migration->dependencies) && is_array($migration->dependencies)) { if (isset($migration->migration_dependencies) && is_array($migration->migration_dependencies)) {
foreach ($migration->dependencies as $dependency) { foreach ($migration->migration_dependencies as $dependency) {
if (is_string($dependency) && !isset($dynamic_ids[$dependency])) { if (is_string($dependency) && !isset($dynamic_ids[$dependency])) {
$this->addDependency($requirement_graph, $id, $dependency, $dynamic_ids); $this->addDependency($requirement_graph, $id, $dependency, $dynamic_ids);
} }