- 🇮🇹Italy kopeboy Milan
Very interested in this as well!
There must be a way of automating the "enforced" string in the yamls?!
A good place for adding this feature is either here or in config_enforce_devel (which has a UI on every config form!)
When exporting config to a module, I usually also want that config to be dependent on the module. That is, the config should only be present when the module is installed, and removed when it is uninstalled.
Drupal provides a way to define additional config dependencies using the enforced key. https://www.drupal.org/node/2404447 →
Without an enforced dependency on the module, you will not be able to reinstall the module after uninstalling it, because the module config will already exist in the active configuration.
What I have been doing is manually adding the enforced dependencies to the exported config and then importing them back to the site. However this is quite tedious and I wonder if there is any way it can be automated.
1. Use config devel to export some config to a custom module.
2. Uninstall the custom module. Note that the exported config is still present in the active config.
3. Try to install the module again.
4. Installation will fail with an error.
Perhaps add the enforced dependency automatically on export. But I am not sure whether this will have unintended consequences.
Active
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Very interested in this as well!
There must be a way of automating the "enforced" string in the yamls?!
A good place for adding this feature is either here or in config_enforce_devel (which has a UI on every config form!)