Review main Ready for review Breaking

98080[!!!][TASK] Drop SingletonInterface from PageRenderer and AssetCollector

Benni Mack CR 0 V +1 Normal +93 −44 updated 11/26/26, 18:56

Commit message

PageRenderer and AssetCollector are shared services in the container,
so the marker is not needed to make them shared. Both are now marked
with #[Autoconfigure(public: true)], so GeneralUtility::makeInstance()
in third-party code keeps returning the shared container instance.

Core code receives both services via dependency injection instead of
GeneralUtility::makeInstance():

* ShortcutButton is a non-shared public service and gets the
  PageRenderer injected via its constructor.
* The backend link handlers get the PageRenderer via
  AbstractLinkHandler::injectPageRenderer(). Link handlers of
  extensions that are not registered as public services still fall
  back to GeneralUtility::makeInstance().
* DefaultJavaScriptAssetTrait receives the AssetCollector as an
  argument from ContentObjectRenderer, LinkFactory and
  EmailLinkBuilder.
* PrepareTypoScriptFrontendRendering, RedirectService and the
  redirects DispatchNotificationHook get them injected.
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 1
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/80/98080/1 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/80/98080/1 && git cherry-pick FETCH_HEAD

Review

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

Merge conflicts 29

Show 24 more changes Show less

Issues 2

Files 22

Show 2 more files Show less

Review log 34

  1. Benni Mack uploaded patch set 1 11/26/26, 18:30

  2. core-ci voted on patch set 1 V +1 11/26/26, 18:36 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/115603

  3. Benni Mack marked it ready for review 11/26/26, 18:37

  4. Oliver Klee voted on patch set 1 V +1 11/26/26, 18:56