Review main Merged Breaking

94820[!!!][TASK] Declare LogRecord final

Benni Mack CR +2 V +2 Normal +93 −112 updated 07/17/26, 18:01

Commit message

LogRecord is a value object created for every single log entry.
Instantiating it through GeneralUtility::makeInstance() caused a
container lookup in one of the hottest code paths of the logging
API, only to allow XCLASSing a plain DTO, which is neither known
to be used nor a supported extension point - processors are the
designated way to enrich log records.

The class is now declared final and instantiated directly via
"new" in Logger::log(). While at it, the class declares
strict_types and uses native type declarations in all method
signatures instead of loose PHPDoc annotations.

This is the first step in decoupling the logging component from
makeInstance() and global state. Follow-ups will move the request
id from the Logger/LogRecord constructors into a dedicated log
processor, instantiate Logger without makeInstance(), and resolve
log writers through the dependency injection container to allow
proper constructor injection (see #104057).

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Wouter Wolters +1
    • Stefan Bürk +1
  • Verified V +2 Done
    • Benni Mack +2
    • Wouter Wolters +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 1

Files 3

Review log 56

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

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

  3. Wouter Wolters voted on patch set 1 CR +1 V +1 07/17/26, 17:55

  4. Stefan Bürk voted on patch set 1 CR +1 V +1 07/17/26, 17:59

  5. Benni Mack commented on patch set 1 CR +2 V +2 07/17/26, 18:01

    thank you
  6. Benni Mack merged patch set 2 07/17/26, 18:01