Convert theme engines into services

Created on 15 July 2012, about 13 years ago
Updated 3 April 2023, over 2 years ago

Due to #1497366: Introduce Plugin System to Core successfully commited can we talk about migrating template system into plugins?

📌 Task
Status

Needs work

Version

10.1

Component
Theme 

Last updated 5 days ago

Created by

🇺🇦Ukraine podarok Ukraine

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

  • Needs reroll

    The patch will have to be re-rolled with new suggestions/changes described in the comments in the issue.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇫🇷France andypost

    There's more changes then _init() hook removal required for new interface

    Thinking a bit more about implementation the engines should be tagged services instead of relying on service name

  • 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.

  • Merge request !13100Convert theme engines to services → (Open) created by berdir
  • Pipeline finished with Failed
    16 days ago
    Total: 230s
    #584140
  • Pipeline finished with Failed
    16 days ago
    Total: 136s
    #584146
  • 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.

  • Pipeline finished with Failed
    14 days ago
    Total: 116s
    #585964
  • Pipeline finished with Failed
    14 days ago
    Total: 223s
    #585973
  • 🇨🇭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.

  • Pipeline finished with Failed
    14 days ago
    Total: 179s
    #585997
  • Pipeline finished with Failed
    14 days ago
    Total: 270s
    #585998
  • Pipeline finished with Failed
    12 days ago
    Total: 234s
    #586670
  • Pipeline finished with Failed
    12 days ago
    Total: 504s
    #586687
  • Pipeline finished with Canceled
    11 days ago
    Total: 69s
    #587533
  • Pipeline finished with Failed
    11 days ago
    Total: 144s
    #587534
  • Pipeline finished with Failed
    11 days ago
    Total: 677s
    #587549
  • Pipeline finished with Failed
    11 days ago
    Total: 664s
    #587555
  • Pipeline finished with Failed
    11 days ago
    Total: 914s
    #587962
  • Pipeline finished with Success
    11 days ago
    Total: 5406s
    #587986
Production build 0.71.5 2024