Not all installed extensions, and their respective namespaces, are properly registered within the container.
This issue is, primarily, relevant to themes and theme engines as modules and profiles are currently hardcoded.
Certain requests only bootstrap so far. If a theme provides a static callback (in the form of #pre_render
, #ajax
, or #lazy_builder
) to a method in one of its classes, this lives in a render array which can become cached. Because of this caching, the entire theme system does not necessarily need to be loaded just to execute a callback. Thus, the namespaces are never registered and the classes cannot be found.
It is a common misnomer that extension namespaces are registered on install.
Currently, the ThemeExtensionList is what instantiates and registers all installed theme namespaces.
DrupalKernel::compileContainer automatically registers module namespaces, simply because they can provide services (since themes cannot). However, these namespaces are done after the service providers have been determined and effectively cut all other installed extension types out of being properly registered.
There are also no significant tests to ensure that these namespaces are registered properly and whether or not they would in fact break contrib.
Register all installed extensions and their namespaces as separate container parameters:
container.namespaces.core
- Drupal specific ['Core', 'Component']
namespaces.container.namespaces.module
container.namespaces.profile
container.namespaces.theme
container.namespaces.theme_engine
container.namespaces.all
- all of the above namespacesFor BC reasons, the existing container.namespaces
parameter/service needs to be aliased to the following namespaces:
container.namespaces.core
container.namespaces.module
container.namespaces.profile
And then deprecate the use of container.namespaces
when
#2954562: [PP-2] Create provider based plugin managers β
makes it way in to allow plugin managers to choose which namespaces to allow.
None
installed_extensions
- Will be used in
#3023131: [PP-1] Extension System, Part IV: ExtensionHandler and ExtensionHandlerInterface β
container.namespaces.core
- Drupal specific ['Core', 'Component']
namespaces.container.namespaces.module
container.namespaces.profile
container.namespaces.theme
container.namespaces.theme_engine
container.namespaces.all
- all of the above namespacesNone
Needs work
11.0 π₯
It is used to alert the framework manager core committer(s) that an issue significantly impacts (or has the potential to impact) multiple subsystems or represents a significant change or addition in architecture or public APIs, and their signoff is needed (see the governance policy draft for more information). If an issue significantly impacts only one subsystem, use Needs subsystem maintainer review instead, and make sure the issue component is set to the correct subsystem.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.