Problem/Motivation
An API for merging in configuration updates from extensions requires the ability to load configuration as available for installation. Core's current APIs don't meet this use case because logic for determining what config is available for install is embedded in methods that can't be called outside the install context. For details see the Background and Use Case section of the project page for the Configuration Provider module.
Configuration Provider models core's config/install
and config/optional
directories as instances of a ConfigProvider
plugin type.
However, the approach of modelling config providers or transformers as plugins has been superseded in core by the configuration transformation API; see the import_transformer
service and related work from #2991683: Move configuration transformation API in \Drupal\Core\Config namespace.
Proposed resolution
- Add a storage of type
MemoryStorage
for use with extension-provided configuration. - Dispatch an event allowing subscribers to transform the storage.
- Refactor the existing
ConfigInstaller
code for loading available config fromconfig/active
andconfig/optional
into event subscribers. Potentially relevant: #2852626: Can we make ConfigInstaller::createConfiguration() Public?.
Comments
Comment #2
nedjoComment #11
nedjoComment #12
nedjo