Convert remaining template_preprocess functions in module include files

Created on 25 July 2025, 19 days ago

Problem/Motivation

Part of πŸ“Œ [pp-1] Convert Template Preprocess hooks to OOP equivalent Postponed: needs info

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)

Steps to reproduce

Proposed resolution

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

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Active

Version

11.0 πŸ”₯

Component

theme system

Created by

πŸ‡¨πŸ‡­Switzerland berdir Switzerland

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @berdir
  • πŸ‡¨πŸ‡­Switzerland berdir Switzerland

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

  • @berdir opened merge request.
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Seems like a good conversion

  • πŸ‡ΊπŸ‡ΈUnited States nicxvan

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

Production build 0.71.5 2024