Review main Merged Breaking

97693[!!!][TASK] Drop SingletonInterface from further core services

Benni Mack CR +2 V +2 Normal +119 −70 updated 11/17/26, 18:37

Commit message

Follow-up to #110578 and #111403. SingletonInterface only turns a
class into a shared and public service, so that
GeneralUtility::makeInstance() can reach it. Sharing is the container
default anyway, so the marker is removed from:

* TYPO3\CMS\Backend\Routing\UriBuilder
* TYPO3\CMS\Core\EventDispatcher\EventDispatcher
* TYPO3\CMS\Core\LinkHandling\LinkService
* TYPO3\CMS\Core\Locking\LockFactory
* TYPO3\CMS\Core\Resource\ResourceFactory
* TYPO3\CMS\Core\TimeTracker\TimeTracker
* TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager
* TYPO3\CMS\Extbase\Reflection\ReflectionService

All of them except EventDispatcher are still fetched by class name
through makeInstance(), in Core and in extensions, and are declared
public with #[Autoconfigure(public: true)] instead. EventDispatcher
stays public through its ServiceProvider registration and alias.

Without a container, as in the failsafe container or in unit tests,
makeInstance() now returns a new LockFactory and TimeTracker on every
call. The other classes need constructor arguments and could not be
created there before either.

Tests that substituted these classes via setSingletonInstance(), which
only accepts SingletonInterface instances, hand the substitute to a
container instead. The PageRouter and logoff unit tests use a one-off
NoopEventDispatcher.

An outdated comment in MaintenanceController that still called
CacheManager a singleton is reworded.

Review

  • Code review CR +2 Done
    • Georg Ringer +2
    • Jochen Roth +1
    • Josua Vogel +1
  • Verified V +2 Done
    • Georg Ringer +2
    • Oliver Klee +1
    • Jochen Roth +1
    • Josua Vogel +1
    • core-ci +1 CI

Issues 2

Files 25

Show 5 more files

Review log 810

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

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

  3. Benni Mack marked it ready for review 11/17/26, 11:05

  4. Benni Mack rebased onto patch set 2 V +1 11/17/26, 11:05

  5. Oliver Klee voted on patch set 2 V +1 11/17/26, 11:58

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

  7. Jochen Roth voted on patch set 2 CR +1 V +1 11/17/26, 16:17

  8. Josua Vogel voted on patch set 2 CR +1 V +1 11/17/26, 18:34

  9. Georg Ringer voted on patch set 2 CR +2 V +2 11/17/26, 18:37

  10. Georg Ringer merged patch set 3 11/17/26, 18:37