public function getMigrationDependencies(bool
$expand = FALSE
) { if (!
$expand) { @
trigger_error('Calling Migration::getMigrationDependencies() without expanding the plugin IDs is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. In most cases, use getMigrationDependencies(TRUE). See https://www.drupal.org/node/3266691', E_USER_DEPRECATED
);
} // @todo Before Drupal 11.0.0, remove ::set() and these checks.
// @see https://www.drupal.org/project/drupal/issues/3262395
$this->migration_dependencies =
($this->migration_dependencies ?:
[]) +
['required' =>
[], 'optional' =>
[]];
if (count($this->migration_dependencies
) !== 2 || !
is_array($this->migration_dependencies
['required'
]) || !
is_array($this->migration_dependencies
['optional'
])) { throw new InvalidPluginDefinitionException($this->
id(), "Invalid migration dependencies configuration for migration {
$this->
id()}"
);
} $this->migration_dependencies
['optional'
] =
array_unique(array_merge($this->migration_dependencies
['optional'
],
$this->
findMigrationDependencies($this->process
)));
if (!
$expand) { return $this->migration_dependencies;
} return array_map( [$this->migrationPluginManager, 'expandPluginIds'
],
$this->migration_dependencies
);
} /**
* Find migration dependencies from migration_lookup and sub_process plugins.
*
* @param array $process
* A process configuration array.
*
* @return array
* The migration dependencies.
*/