Review main Ready for review Breaking

98083[!!!][TASK] Drop SingletonInterface from Context

Benni Mack CR 0 V -1 Normal +137 −77 updated 11/26/26, 20:44

Commit message

Context is a shared service in the container, so the marker is not
needed to make it shared. It is now marked with
GeneralUtility::makeInstance() in third-party code keeps returning the
shared container instance.

Core classes built by the container receive the Context via
dependency injection instead of GeneralUtility::makeInstance(). Menu
content objects and SaveToDatabaseFinisher get it via inject methods,
so subclasses with own constructors keep working.

Classes created with "new", static code and ViewHelpers still use
GeneralUtility::makeInstance().

Tests that replaced the Context via
GeneralUtility::setSingletonInstance() now configure the shared
instance from the container, or hand a Context to the subject.
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/83/98083/1 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/83/98083/1 && git cherry-pick FETCH_HEAD

Review

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

Merge conflicts 33

Show 28 more changes Show less

Issues 2

Files 38

Show 18 more files Show less

Review log 12

  1. Benni Mack uploaded patch set 1 11/26/26, 20:33

  2. core-ci voted on patch set 1 V -1 11/26/26, 20:44 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/115622