Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
theme system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
25 Feb 2026 at 03:53 UTC
Updated:
1 Jun 2026 at 21:23 UTC
Jump to comment: Most recent
Themes can now be OOP.
Let's convert all remaining themes except claro, olivero and starterkit.
Open *.theme
Use rector to convert
Review
N/A
N/A
N/A
N/A
N/A
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
nicxvan commentedComment #5
nicxvan commentedComment #6
smustgrave commentedWould it be safer to break umami and stable9 into their own issues?
Comment #7
nicxvan commentedI don't even think we need to split claro and olivero out, we converted all core modules in one go. I split it out to try to get more reviews.
I would keep the remaining ones together to minimize disruption though.
Comment #8
smustgrave commentedThey appear like good conversions though.
Comment #9
longwaveAdded a question about stable9. Umami is explicitly only a demo so BC there isn't necessary.
Comment #10
nicxvan commentedI added BC for stable9, it's good to have an example for that too since it's different than BC for modules.
Comment #11
smustgrave commentedFeedback appears to be addressed!
Comment #12
longwaveCommitted and pushed cc89478fae0 to main and 7ba1a2447d4 to 11.x. Thanks!
Comment #18
donquixote commentedHi,
just my 5 cents in hindsight.
I think I super disagree about removing the test functions for procedural preprocess.
I see we did re-add procedural hooks for testing in #3579629: Add procedural hooks to test theme to test collection and invoking legacy hooks. But this does not have the coverage of the old hooks, with sub-themes.
In fact we should have added more procedural examples, not less, to cover scenarios that were previously not covered.
Comment #19
nicxvan commentedFeel free to open an issue for that in the theme queue and ping me with it if you want to work on adding additional coverage.
Comment #20
donquixote commentedI am currently investigating if the order of procedural implementations has changed in some scenarios.
I will open an issue based on my findings.
But, the best time to add these additional tests would have been before the introduction of OOP preprocess.
Now if we find out that the order has changed from 11.2 to 11.3, it will be hard to fix, because then we'd break Drupal 11.3 behavior.
But, I should do my homework first, before I start a drama :)