- 🇫🇷France andypost
There's more changes then
_init()
hook removal required for new interfaceThinking a bit more about implementation the engines should be tagged services instead of relying on service name
- 🇫🇷France andypost
Sounds like duplicate of #2973439: Make extension services tagged services →
- First commit to issue fork.
- First commit to issue fork.
- 🇨🇭Switzerland berdir Switzerland
Updated and converted this to a MR. This was tricky because not a single line of this still applied cleanly, at the same time, various things are also no longer necessary and much simpler now. We already have the callback resolver in ThemeManager, initTheme no longer exists.
I had the idea to deprecate preprocessing for theme engines. It doesn't seem used anywhere and this already doesn't support per-hook preprocessing. I suppose we could keep the generic one if we can think of a use case, but I'd much rather move it out if not needed, simplifies the interface.
Fully agree that this should use tagged services inject them, but wanted to start somewhere. I guess the collection class was kind of meant to do that, unsure if we want that in a separate service or inject it into the ThemeManager directly. We do need it in the Registry as well, but we have access to the theme manager there.
I'm also wondering if we want to deprecate theme engines as a type of extension completely. If they're a service then a module can provide a theme extension. A theme could as well if we support services there.
The Needs Review Queue Bot → tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide → to find step-by-step guides for working with issues.
- 🇨🇭Switzerland berdir Switzerland
I was wondering how this was actually working. The answer is, it wasn't. theme engines have no services, the services file name and typos and the content wasn't valid either.
I think the sensible path forward is indeed to completely deprecate the concept of theme engine extensions. theme engine services must be provided by modules. That means existing theme engines will need to be completely redone as a module, but most that I could find are just experiments/old. experience_builder seems to be doing some stuff with it.