tl;dr: Something like Configuration Split... but in core.
Problem/Motivation
Drupal 8's core configuration management allows me to export all configuration (or single files) and import all configuration (or single files), which is great. But one use case I run into quite often relates to how I develop Drupal sites.
I often have at least a local development environment in addition to production.
And sometimes I have a local, dev, stage, and production environment (4 total) that I manage.
The main problem I've encountered relates to my ability to have certain modules enabled in production, and other ones in other environments. As a simple use case:
- Production uses Google Analytics
- Local disables Google Analytics
- Local enables Devel and XHProf for debugging, and I configure them specially for local
With Core CMI alone and a full export of configuration, it's impossible for me to export all my local configuration then deploy it to production, without manually deleting some files and editing a file like core.extension.yml
to remove those local-development-only modules.
In the contrib space, the best solution to this problem that still allows a full, not --partial, configuration export/import, is to install and use the Configuration Split module.
As a user story:
As a Drupal developer, I want to have certain modules and related configuration differ between multiple instances of a single Drupal site, so I don't have to have all the exact same configuration in all my environments.
Proposed resolution
Have something like Configuration Split as part of core CMI.
Basically, give me the ability to have a 'split' of my configuration for each environment, and in each split, give me the ability to manage a list of installed modules and configuration that should only be used in that environment.
So when I export configuration locally, it preserves the configuration for Devel and XHProf, and also indicates I have the Google Analytics module disabled. But when I deploy the configuration to production, it knows that Google Analytics needs to be enabled but doesn't care about Devel and XHProf.
Remaining tasks
- Figure out the best solution to this problem.
- Do some coding magic.
- Make this problem solvable in core.
User interface changes
TBD.
API changes
TBD.
Data model changes
TBD.