Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
theme system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
25 Jul 2025 at 15:47 UTC
Updated:
23 Sep 2025 at 16:49 UTC
Jump to comment: Most recent
Part of #3504381: [meta] Convert Template Preprocess hooks to OOP equivalent
Scope is to convert all remaining template preprocess functions in include files that aren't already in a dedicated issue (such as views, system, image, see meta issue)
* Move all template_preprocess functions in update module to $ModuleThemeHooks, including hook_theme itself
* Deprecate the old functions and move them to .module, so that the file definitions can be removed
* Update all references, including direct calls in tests and @see/@covers in tests and templates.
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 #2
berdirJust three modules left, with 5 template preprocess functions in total. One less than I expected, also because block_content is being taken care of in a separate issue and fully deprecated.
Comment #4
smustgrave commentedSeems like a good conversion
Comment #5
nicxvan commented+1
Did all of my usual checks except the zebra check.
No double _
All deprecations are the right version and the same 11.3 and removed in 12.
All functions are __FUNCTION__ and files are __FILE__
initial preprocess align and so do the deprecated calls.
Comments were updated correctly.
I'll run the zebra check if i get a chance.
Comment #6
catchCommitted/pushed to 11.x, thanks!