Convert template_preprocess in form.inc

Created on 6 July 2025, 1 day ago

Problem/Motivation

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

Steps to reproduce

Proposed resolution

Convert all template_preprocess functions in form.inc to a new Preprocess service, keep them as BC.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Active

Version

11.0 πŸ”₯

Component

forms system

Created by

πŸ‡¨πŸ‡­Switzerland berdir Switzerland

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

Merge Requests

Comments & Activities

  • Issue created by @berdir
  • Merge request !12636convert form template preprocess β†’ (Open) created by berdir
  • Pipeline finished with Failed
    1 day ago
    Total: 183s
    #540200
  • πŸ‡¨πŸ‡­Switzerland berdir Switzerland

    I was tempted to also move form_select_options() as it's a function that in core is only used from template_preprocess_select(), but there are direct calls in contrib, so we might want to move it to FormHelper or so and that is then definitely out of scope.

    Similar with form_get_options(), which is actually not called at all in core or contrib and I think we should deprecate that without replacement.

    Beside those two, the only thing left in form.inc is then batch functions.

  • Pipeline finished with Success
    1 day ago
    Total: 635s
    #540204
  • πŸ‡ΊπŸ‡ΈUnited States nicxvan

    I have done a partial review:

    I've confirmed all deprecations are 11.3 -> 12

    All are __function__

    All functions call the right method
    All initial preprocess call the right method
    All comments point to the new method

    Need to run the git command to confirm the body of the methods align.

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

    Ok I had a chance to finish my review with: git diff 11.x --color-moved=dimmed_zebra --color-moved-ws=ignore-all-space
    See #3518822-14: Convert template preprocess hooks in core/includes/theme.inc β†’ for an explanation.

    With that and my review above this is RTBC.

    The only line length changes for Codesniff are the comment in the media module.

Production build 0.71.5 2024