diff --git a/core/lib/Drupal/Core/Config/ConfigInstaller.php b/core/lib/Drupal/Core/Config/ConfigInstaller.php
index cc0d88f..97c3688 100644
--- a/core/lib/Drupal/Core/Config/ConfigInstaller.php
+++ b/core/lib/Drupal/Core/Config/ConfigInstaller.php
@@ -511,6 +511,7 @@ protected function findDefaultConfigWithUnmetDependencies(StorageInterface $stor
* TRUE if the dependencies are met, FALSE if not.
*/
protected function validateDependencies($config_name, array $data, array $enabled_extensions, array $all_config) {
+ list($provider) = explode('.', $config_name, 2);
if (isset($data['dependencies'])) {
$all_dependencies = $data['dependencies'];
@@ -521,7 +522,6 @@ protected function validateDependencies($config_name, array $data, array $enable
}
// Ensure the configuration entity type provider is in the list of
// dependencies.
- list($provider) = explode('.', $config_name, 2);
if (!isset($all_dependencies['module'])) {
$all_dependencies['module'][] = $provider;
}
@@ -548,6 +548,10 @@ protected function validateDependencies($config_name, array $data, array $enable
}
}
}
+ else {
+ // Simple config or a config entity without dependencies.
+ return in_array($provider, $enabled_extensions, TRUE);
+ }
return TRUE;
}
diff --git a/core/modules/config/src/Tests/ConfigInstallWebTest.php b/core/modules/config/src/Tests/ConfigInstallWebTest.php
index 0867f4b..63b799c 100644
--- a/core/modules/config/src/Tests/ConfigInstallWebTest.php
+++ b/core/modules/config/src/Tests/ConfigInstallWebTest.php
@@ -180,7 +180,7 @@ public function testUnmetDependenciesInstall() {
// not depend on config_test and order is important.
$this->drupalPostForm('admin/modules', array('modules[Testing][config_test][enable]' => TRUE), t('Install'));
$this->drupalPostForm('admin/modules', array('modules[Testing][config_install_dependency_test][enable]' => TRUE), t('Install'));
- $this->assertRaw('Unable to install Config install dependency test, config_test.dynamic.other_module_test_with_dependency has unmet dependencies.');
+ $this->assertRaw('Unable to install Config install dependency test, config_other_module_config_test.weird_simple_config, config_test.dynamic.other_module_test_with_dependency have unmet dependencies.');
$this->drupalPostForm('admin/modules', array('modules[Testing][config_other_module_config_test][enable]' => TRUE), t('Install'));
$this->drupalPostForm('admin/modules', array('modules[Testing][config_install_dependency_test][enable]' => TRUE), t('Install'));
diff --git a/core/modules/config/tests/config_install_dependency_test/config/install/config_other_module_config_test.weird_simple_config.yml b/core/modules/config/tests/config_install_dependency_test/config/install/config_other_module_config_test.weird_simple_config.yml
new file mode 100644
index 0000000..20e9ff3
--- /dev/null
+++ b/core/modules/config/tests/config_install_dependency_test/config/install/config_other_module_config_test.weird_simple_config.yml
@@ -0,0 +1 @@
+foo: bar
diff --git a/core/modules/config/tests/config_other_module_config_test/config/schema/config_other_module_config_test.schema.yml b/core/modules/config/tests/config_other_module_config_test/config/schema/config_other_module_config_test.schema.yml
new file mode 100644
index 0000000..9025158
--- /dev/null
+++ b/core/modules/config/tests/config_other_module_config_test/config/schema/config_other_module_config_test.schema.yml
@@ -0,0 +1,5 @@
+config_other_module_config_test.weird_simple_config:
+ type: config_object
+ mapping:
+ foo:
+ type: string
diff --git a/core/modules/contact/config/install/foo.bar.yml b/core/modules/contact/config/install/foo.bar.yml
new file mode 100644
index 0000000..f4ae0c2
--- /dev/null
+++ b/core/modules/contact/config/install/foo.bar.yml
@@ -0,0 +1,5 @@
+default_form: feedback
+flood:
+ limit: 5
+ interval: 3600
+user_default_enabled: true
diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php
index 20aa72a..f8d76c8 100644
--- a/core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php
+++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigInstallTest.php
@@ -199,8 +199,8 @@ public function testDependencyChecking() {
}
catch (UnmetDependenciesException $e) {
$this->assertEqual($e->getExtension(), 'config_install_dependency_test');
- $this->assertEqual($e->getConfigObjects(), ['config_test.dynamic.other_module_test_with_dependency']);
- $this->assertEqual($e->getMessage(), 'Configuration objects (config_test.dynamic.other_module_test_with_dependency) provided by config_install_dependency_test have unmet dependencies');
+ $this->assertEqual($e->getConfigObjects(), ['config_other_module_config_test.weird_simple_config', 'config_test.dynamic.other_module_test_with_dependency']);
+ $this->assertEqual($e->getMessage(), 'Configuration objects (config_other_module_config_test.weird_simple_config, config_test.dynamic.other_module_test_with_dependency) provided by config_install_dependency_test have unmet dependencies');
}
$this->installModules(['config_other_module_config_test']);
$this->installModules(['config_install_dependency_test']);