diff -u b/core/modules/config/lib/Drupal/config/Tests/ConfigOtherModuleTest.php b/core/modules/config/lib/Drupal/config/Tests/ConfigOtherModuleTest.php --- b/core/modules/config/lib/Drupal/config/Tests/ConfigOtherModuleTest.php +++ b/core/modules/config/lib/Drupal/config/Tests/ConfigOtherModuleTest.php @@ -93,11 +93,16 @@ $this->assertTrue(entity_load('config_test', 'other_module', TRUE), 'Default configuration provided by config_other_module_config has been installed.'); } + /** + * Tests uninstalling node removes views which are dependent on them. + */ public function testUninstall() { $this->moduleHandler->install(array('views')); - $this->assertTrue(entity_load('view', 'frontpage', TRUE) !== NULL, 'Frontpage view which is dependant on the Node module exists.'); + $this->assertTrue(entity_load('view', 'frontpage', TRUE) === NULL, 'After installing Views, frontpage view which is dependant on the Node and Views modules does not exist.'); + $this->moduleHandler->install(array('node')); + $this->assertTrue(entity_load('view', 'frontpage', TRUE) !== NULL, 'After installing Node, frontpage view which is dependant on the Node and Views modules exists.'); $this->moduleHandler->uninstall(array('node')); - $this->assertTrue(entity_load('view', 'frontpage', TRUE) === NULL, 'Frontpage view which is dependant on the Node module does not exist.'); + $this->assertTrue(entity_load('view', 'frontpage', TRUE) === NULL, 'After uninstalling Node, frontpage view which is dependant on the Node and Views modules does not exist.'); } } only in patch2: unchanged: --- a/core/lib/Drupal/Core/Config/Schema/core.data_types.schema.yml +++ b/core/lib/Drupal/Core/Config/Schema/core.data_types.schema.yml @@ -136,3 +136,24 @@ route: sequence: - type: string label: 'Param' + +# Config dependencies. +config_dependency: + type: mapping + label: 'Configuration dependencies' + mapping: + entity: + type: sequence + label: 'Entity dependencies' + sequence: + - type: boolean + module: + type: sequence + label: 'Module dependencies' + sequence: + - type: boolean + theme: + type: sequence + label: 'Theme dependencies' + sequence: + - type: boolean only in patch2: unchanged: --- a/core/modules/views/config/schema/views.schema.yml +++ b/core/modules/views/config/schema/views.schema.yml @@ -117,3 +117,6 @@ views.view.*: label: 'Position' display_options: type: views.display.[%parent.display_plugin] + dependencies: + type: config_dependency + label: 'Dependencies'