Review main Merged

93208[FEATURE] Add expression language support for limitToPages

Benni Mack CR +2 V +2 Hard +773 −6 updated 03/25/26, 14:21

Commit message

The limitToPages option in route enhancers now accepts Symfony
Expression Language expressions alongside integer page IDs.

Each entry in the limitToPages array is OR-combined:
- Integer values match against the page ID (existing)
- String values are evaluated as expressions

This allows integrators to dynamically target pages by their
properties instead of maintaining static page ID lists:

    limitToPages:
      - 42
      - 'page["doktype"] == 1'
      - 'page["backend_layout"] == "news"'

Available variables: page (record array), site (Site object)
and siteLanguage (SiteLanguage object).

A new "routing" expression language context is registered so
extensions can provide additional functions and variables.

The page candidate query in PageSlugCandidateProvider now uses
SELECT * to make all page fields available for evaluation.

Review

  • Code review CR +2 Done
    • Anja Leichsenring +2
    • Georg Ringer +1
  • Verified V +2 Done
    • Anja Leichsenring +2
    • Georg Ringer +1
    • core-ci +1 CI

Issues 1

Files 7

Review log 67

  1. Benni Mack uploaded patch set 1 03/16/26, 17:06

  2. core-ci voted on patch set 1 V +1 03/16/26, 17:15 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/98039

  3. Benni Mack marked it ready for review 03/25/26, 12:53

  4. Georg Ringer voted on patch set 1 CR +1 V +1 03/25/26, 13:59

  5. Anja Leichsenring voted on patch set 1 CR +2 V +2 03/25/26, 14:19

  6. Anja Leichsenring merged patch set 2 03/25/26, 14:19

  7. Anja Leichsenring commented on patch set 2 03/25/26, 14:21

    I just saw the ready for review date, sorry for violating the 24 hour grace period. If someone finds issues, I am ready to revert.