Review 14.3 Merged

96659[BUGFIX] Pass route requirements through to Symfony router

Benjamin Franzke CR +2 V +2 Easy +36 −1 updated 10/13/26, 07:42

Commit message

Backend routes may contain placeholders, but the Router created
the Symfony route without requirements. Every placeholder thus
fell back to the default "[^/]+", which made it impossible to
match or generate a backend URL whose placeholder contains a
slash, or to restrict a placeholder to a pattern.

The route option "requirements" is now passed through to the
Symfony route, so it is honoured by both the URL matcher and the
URL generator:

    'my_route' => [
        'path' => '/my-path/{subroute}',
        'target' => MyController::class . '::handleRequest',
        'requirements' => [
            'subroute' => '.+',
        ],
    ],

Review

  • Code review CR +2 Done
    • Benjamin Franzke +2
  • Verified V +2 Done
    • Benjamin Franzke +2
    • core-ci +1 CI

Issues 1

Files 3

Review log 45

  1. Benjamin Franzke commented on patch set 1 10/13/26, 06:57

    Cherry Picked from branch main. The following files contain Git conflicts: * typo3/sysext/backend/Classes/Routing/Router.php
  2. Benjamin Franzke uploaded patch set 2 10/13/26, 07:01

  3. core-ci voted on patch set 2 V +1 10/13/26, 07:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/110980

  4. Benjamin Franzke commented on patch set 2 CR +2 V +2 10/13/26, 07:42

    This change is ready for review.
  5. Benjamin Franzke merged patch set 3 10/13/26, 07:42