- Issue created by @tstoeckler
- 🇩🇪Germany tstoeckler Essen, Germany
Ha, noticed that we cannot use
ModuleHandlerInterface::loadInclude()
as Config Overlay is not installed at that moment (inherently), so we need to manually require the file. Updated the issue summary... - 🇩🇪Germany tstoeckler Essen, Germany
Hmm... yeah I think all of that stuff can be deprecated in favor of pointing people to 🐛 Dispatch config transformation event during site install from configuration Active if they encounter any installation issues.
Tentatively renaming the issue...
- 🇩🇪Germany tstoeckler Essen, Germany
Really wavering back and forth on this one a bit...
Tried what @bircher mentioned in the core issue in #5: To add the config overlay config transformer via settings.php. That's not super intuitive, though you need this whole things in your
services.yml
:services: # See config_overlay.services.yml config_overlay.extension_storage_factory: class: Drupal\config_overlay\Config\ExtensionStorageFactory arguments: ['@extension.list.profile'] config_overlay.config_subscriber.transform_early: class: Drupal\config_overlay\EventSubscriber\ConfigTransformEarlySubscriber arguments: - '@extension.list.profile' - '%install_profile%' - '@config_overlay.extension_storage_factory' - '@config.storage' tags: - { name: event_subscriber }
And then, because Config Overlay is not in the autoloader by default, the following in your project's composer.json:
"autoload": { "classmap": [ "web/modules/contrib/config_overlay/src/Config/ExtensionOptionalStorage.php", "web/modules/contrib/config_overlay/src/Config/ExtensionStorageFactory.php", "web/modules/contrib/config_overlay/src/Config/ReadOnlyUnionStorage.php", "web/modules/contrib/config_overlay/src/EventSubscriber/ConfigTransformEarlySubscriber.php", "web/modules/contrib/config_overlay/src/EventSubscriber/ConfigTransformSubscriberBase.php" ] },
Not sure if there's a way we can tidy that up a bit, but not sure I want to actually recommend people doing so, as it seems like a lot of work...