Extensions can provide configuration that has no dependency on itself - eg. the Book node type in the Book module. We ensure a dependency by adding an enforced dependency. This is done manually. However, users have the general expectation that configuration in config/install and config/optional should depend on the module that provides in. This would help solve current bugs like #2459619: migrate_drupal cannot be uninstalled and reinstalled and some of the issues raised on #2431157-3: Review PreExistingConfigException special casing for install profile and #2460529-20: Migrations need to use the configuration entity dependency system.

The config/optional is going to be tricky to solve :(

Comments

bojanz’s picture

Most D8 contrib (mine included) is not uninstallable because of config left behind.
Personally, it was completely logical to me that config provided by my module would depend on that module, but it doesn't.
Views does this, but I think it should be done by ConfigEntityBase, to cover all config entity types.

IRC clarifications from catch:

catch> bojanz: but there was a reason not to do it.
catch> bojanz: the case would be when you install a module that provides some default stuff, change the config and use it, but then realise you don't want the actual module.
catch> bojanz: then you uninstall it and whoops all your stuff got nuked.

catch> bojanz: so with the uninstall issue, I think it's worth an issue to revisit.
catch> bojanz: I think when we did that, we weren't handling things like deleting node types when there's nodes of that type, we mostly are now.
catch> As in we stop you uninstalling and you have to go delete the nodes.
catch> Rather than just uninstalling and site is in limbo.
catch> Then someone can write config_detach module that just lets you nuke those hard dependencies.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.