diff --git a/core/lib/Drupal/Core/Config/ConfigInstaller.php b/core/lib/Drupal/Core/Config/ConfigInstaller.php index 5348cdc..a749f54 100644 --- a/core/lib/Drupal/Core/Config/ConfigInstaller.php +++ b/core/lib/Drupal/Core/Config/ConfigInstaller.php @@ -242,7 +242,7 @@ protected function createConfiguration($collection, array $config_to_install, ar // been dependency checked already. But configuration provided by other // extensions won't have. If this fails just ignore the configuration // and continue. - if (!$this->validateDependencies($data[$name], $enabled_extensions, $all_config)) { + if (!$this->validateDependencies($name, $data[$name], $enabled_extensions, $all_config)) { continue; } $entity_storage = $this->configManager @@ -444,19 +444,15 @@ protected function findDefaultConfigWithUnmetDependencies($type, $name, array $e $list = $this->listExtensionProvidedConfig($type, $name, StorageInterface::DEFAULT_COLLECTION, $enabled_extensions); $all_config = array_merge($this->configFactory->listAll(), $list); return array_filter($list, function($config_name) use ($default_storage, $enabled_extensions, $all_config) { - // All the migrate tests will fail if we check since they install the - // migrate_drupal module but only set up the dependencies for the single - // migration they are testing. - if (strpos($config_name, 'migrate.migration.') === 0) { - return FALSE; - } - return !$this->validateDependencies($default_storage->read($config_name), $enabled_extensions, $all_config); + return !$this->validateDependencies($config_name, $default_storage->read($config_name), $enabled_extensions, $all_config); }); } /** * Validates an array of config data that contains dependency information. * + * @param string $config_name + * The name of the configuration object that is being validated. * @param array $data * Configuration data. * @param array $enabled_extensions @@ -467,7 +463,13 @@ protected function findDefaultConfigWithUnmetDependencies($type, $name, array $e * @return bool * TRUE if the dependencies are met, FALSE if not. */ - protected function validateDependencies(array $data, array $enabled_extensions, array $all_config) { + protected function validateDependencies($config_name, array $data, array $enabled_extensions, array $all_config) { + // All the migrate tests will fail if we check since they install the + // migrate_drupal module but only set up the dependencies for the single + // migration they are testing. + if (strpos($config_name, 'migrate.migration.') === 0) { + return TRUE; + } if (isset($data['dependencies'])) { $all_dependencies = $data['dependencies']; diff --git a/core/modules/system/tests/themes/test_basetheme/config/install/core.date_format.fancy.yml b/core/modules/system/tests/themes/test_basetheme/config/install/core.date_format.fancy.yml index 37a0bf8..05d5e27 100644 --- a/core/modules/system/tests/themes/test_basetheme/config/install/core.date_format.fancy.yml +++ b/core/modules/system/tests/themes/test_basetheme/config/install/core.date_format.fancy.yml @@ -7,3 +7,7 @@ status: true langcode: en locked: false pattern: 'U' +dependencies: + enforced: + theme: + - test_basetheme