diff -u b/core/lib/Drupal/Core/Config/ConfigInstaller.php b/core/lib/Drupal/Core/Config/ConfigInstaller.php --- b/core/lib/Drupal/Core/Config/ConfigInstaller.php +++ b/core/lib/Drupal/Core/Config/ConfigInstaller.php @@ -482,11 +482,21 @@ * A list of all the currently enabled modules and themes. * @param array $all_config * A list of all the active configuration names. + * @param array $additional_config + * A list of configuration prospectively to be added to active config. * * @return bool * TRUE if the dependencies are met, FALSE if not. */ - protected function validateDependencies($config_name, array $data, array $enabled_extensions, array $all_config) { + public function validateDependencies($config_name, array $data, array $enabled_extensions = array(), array $all_config = array(), array $additional_config = array()) { + if (empty($enabled_extensions)) { + $enabled_extensions = $this->getEnabledExtensions(); + } + if (empty($all_config)) { + $all_config = $this->getActiveStorages()->listAll(); + } + $all_config = array_merge($all_config, $additional_config); + if (isset($data['dependencies'])) { $all_dependencies = $data['dependencies']; @@ -528,14 +538,6 @@ } /** - * {@inheritdoc} - */ - public function validateDependenciesWrapper($config_name, array $data, array $additional_config) { - $all_config = array_merge($this->getActiveStorages()->listAll(), $additional_config); - return $this->validateDependencies($config_name, $data, $this->getEnabledExtensions(), $all_config); - } - - /** * Gets the list of enabled extensions including both modules and themes. * * @return array diff -u b/core/lib/Drupal/Core/Config/ConfigInstallerInterface.php b/core/lib/Drupal/Core/Config/ConfigInstallerInterface.php --- b/core/lib/Drupal/Core/Config/ConfigInstallerInterface.php +++ b/core/lib/Drupal/Core/Config/ConfigInstallerInterface.php @@ -119,9 +119,14 @@ * Configuration data. + * @param array $enabled_extensions + * A list of all the currently enabled modules and themes. + * @param array $all_config + * A list of all the active configuration names. * @param array $additional_config - * List of configuration names to be considered as present. + * A list of configuration prospectively to be added to active config. * * @return bool * TRUE if the dependencies are met, FALSE if not. */ - public function validateDependenciesWrapper($config_name, array $data, array $additional_config); + public function validateDependencies($config_name, array $data, array $enabled_extensions = array(), array $all_config = array(), array $additional_config = array()); + } diff -u b/core/modules/migrate_drupal/src/Tests/MigrateDrupalTestBase.php b/core/modules/migrate_drupal/src/Tests/MigrateDrupalTestBase.php --- b/core/modules/migrate_drupal/src/Tests/MigrateDrupalTestBase.php +++ b/core/modules/migrate_drupal/src/Tests/MigrateDrupalTestBase.php @@ -57,7 +57,7 @@ $migration_templates = \Drupal::service('migrate.template_storage')->findTemplatesByTag($version); $all_template_names = array_keys($migration_templates); foreach ($migration_templates as $template_name => $template) { - if ($config_installer->validateDependenciesWrapper($template_name, $template, $all_template_names)) { + if ($config_installer->validateDependencies($template_name, $template, array(), array(), $all_template_names)) { $migration = Migration::create($template); $migration->save(); }