Review main Ready for review Breaking

98096[!!!][TASK] Provide page routers via PageRouterFactory

Benni Mack CR 0 V 0 Hard +384 −78 updated 11/27/26, 09:57

Commit message

Site->getRouter() created a new PageRouter for each call, and the
router fetched all of its dependencies via makeInstance(). Nothing
the router built up survived a call: with an expression in
"limitToPages" of a route enhancer, every generateUri() call created
a new ExpressionLanguage Resolver, which took about 90 of 150 µs per
generated link.

The new PageRouterFactory service creates page routers with all
dependencies injected and keeps one router per site and context,
held weakly. Site->getRouter() returns the router of the factory,
and core services inject the factory instead of calling it.

The PageRouter constructor now requires all of its dependencies.
The "limitToPages" resolver is created once per router, page and
site language are handed over on each evaluation.
Show more Show less

Test this change

Run a command in your clone of the TYPO3 Core. Then try what the change does and vote on Verified in Gerrit. How to review a patch

Check out patch set 2
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/96/98096/2 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/96/98096/2 && git cherry-pick FETCH_HEAD

Review

  • Code review CR 0 Needs a vote
  • Verified V 0 Needs a vote
    • core-ci +1 CI

Merge conflicts 22

Show 17 more changes Show less

Issues 1

Files 24

Show 4 more files Show less

Review log 35

  1. Benni Mack uploaded patch set 1 11/27/26, 09:01

  2. core-ci voted on patch set 1 V +1 11/27/26, 09:12 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/115684

  3. Benni Mack marked it ready for review 11/27/26, 09:51

  4. Benni Mack updated the commit message in patch set 2 V +1 11/27/26, 09:51

  5. core-ci voted on patch set 2 V +1 11/27/26, 09:57 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/115699