Review main Merged Breaking

94826[!!!][TASK] Declare Logger final

Benni Mack CR +2 V +2 Normal +63 −15 updated 07/20/26, 10:01

Commit message

The Logger is a plain, per-channel object created and configured by
the LogManager. Instantiating it through GeneralUtility::makeInstance()
only served to allow overriding the class via XCLASS, which is not a
supported extension point for the logging API. Now that the request id
no longer travels through the Logger constructor (#110219), the logger
can be created with a plain "new", so the class is declared final and
LogManager instantiates it directly.

Tests that mocked the concrete Logger now mock the PSR-3
LoggerInterface, which is the actual dependency of the consuming code.

This completes the decoupling of the logging component's object
creation from makeInstance() and XCLASS (#110218, #110219, #110220):
LogRecord and Logger are now plain value/service objects. The remaining
step is to resolve log writers through the dependency injection
container, so writers can use proper constructor injection instead of
the options-array constructor on AbstractWriter, which also fixes shared
log writers being instantiated as separate objects (see #104057).

Review

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

Issues 1

Files 7

Review log 913

  1. Benni Mack uploaded patch set 1 07/17/26, 19:04

  2. core-ci voted on patch set 1 V -1 07/17/26, 19:12 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104909

  3. Benni Mack uploaded patch set 2 V -1 07/17/26, 19:43

  4. core-ci voted on patch set 2 V +1 07/17/26, 19:51 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104910

  5. Benni Mack uploaded patch set 3 V +1 07/17/26, 20:09

  6. core-ci voted on patch set 3 V -1 07/17/26, 20:18 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104911

  7. Benni Mack uploaded patch set 4 V -1 07/17/26, 20:30

  8. core-ci voted on patch set 4 V +1 07/17/26, 20:40 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/104913

  9. Oliver Klee voted on patch set 4 CR +1 V +1 07/18/26, 09:23

  10. Benjamin Franzke voted on patch set 4 CR +1 07/20/26, 09:45

  11. Benjamin Franzke voted on patch set 4 V +1 07/20/26, 09:47

  12. Benni Mack voted on patch set 4 CR +2 V +2 07/20/26, 10:01

  13. Benni Mack merged patch set 5 07/20/26, 10:01