Problem/Motivation
Drupal 8 core currently does not have any API for configuration export.
This means that tools such as drush or the drupal console have come up with their own way of exporting configuration. The way they do that is by reading directly from the active configuration storage service.
This will make it very difficult in the future to improve the workflow with for example #3028179: Config Environment module (core experimental) without patching drush.
Currently CMI improvements working with config_filter get around this because config_filter decorates the sync storage and drush uses the sync storage service when no argument is passed to the commands and thus it only works in the default case.
With #2991683: Add configuration transformer API we are adding a new API that will make working with it much easier and also work with the zip workflow. But it should remain the responsibility of core to make sure that the API is called properly.
Proposed resolution
Add a new service: config.export.factory
with a method getExportStorage()
In a first version in 8.7 this will just return a memory storage with the contents of config.storage
.
Drush and console can check if the new service exists and get the storage from it or continue using config.storage
directly if the site runs on 8.6.
Then in 8.8 when the environment module becomes an experimental module drush and console will not have to be patched.
Remaining tasks
Write patch.
review
commit
User interface changes
None
API changes
API addition. New service.
Data model changes
None.
Release notes snippet
TBD