This is a componentized piece broken out of. The proposal there is to move language overrides to be a regular config override and therefore even those would involve the events system. For such a core operation as a configuration override, especially when invoked on all sites using configuration, it is important that this goes fast. Part of the proposal in was to move from an event subscriber system to override services, which are compiled to the Drupal kernel. Therefore if no modules are enabled which provide override services, no time is wasted calling for overrides.
- Instead of using events for overrides, use services tagged with
config.factory.override. The relative priority of these services defines the priority of the overrides themselves.
- Add a
ConfigFactoryOverrideInterfaceto define these services, so we have a standard way to retrieve overrides from them.
- Modify the config factory to be able to take these overrides and use them when needed.
- Modify existing override event listeners to now be services tagged as config factory overrides (only affects tests due to not having any other implementation of module overrides).
This does not actually change anything regards to language handling per say. Moving that to an override service instead of a baked-in configuration solution would require much wider changes, eg. moving language responsibilities from Config an ConfigFactory to LanguageManagers, etc. That would be most of the patch from. Instead this issue is focusing on changing the module override system for now and we can move the language overrides to this system in a followup.
User interface changes
- The 'config.module.overrides' event is removed.
- ConfigFactoryOverrideInterface added to be implemented by services providing overrides.
- Instead of services tagged as event_subscriber (implementing EventSubscriberInterface), now overrides are provided by services tagged as config.factory.override (implementing ConfigFactoryOverrideInterface)