Review main Ready for review Stale

84620[BUGFIX] Drop constructor arguments if not set

Eike Starkmann CR 0 V -1 Easy +1 −1 updated 08/01/26, 10:10

Commit message

Passing them leads to single instances being instanciated as new object. Happens for InMemoryWriter of the admin panel for example.

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 4
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/20/84620/4 && git checkout FETCH_HEAD
Cherry-pick onto main
git fetch https://review.typo3.org/Packages/TYPO3.CMS refs/changes/20/84620/4 && git cherry-pick FETCH_HEAD

Review

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

Merge conflicts 1

Issues 1

Files 1

Review log 1015

  1. Eike Starkmann uploaded patch set 1 06/11/24, 15:26

  2. core-ci voted on patch set 1 V -1 06/11/24, 15:33 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/59211

  3. Eike Starkmann uploaded patch set 2 V -1 06/11/24, 16:40

  4. core-ci voted on patch set 2 V -1 06/11/24, 16:48 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/59216

  5. core-ci voted on patch set 2 V +1 06/14/24, 21:47 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/59216

  6. Georg Ringer voted on patch set 2 CR +1 V +1 06/18/24, 11:45

  7. Christian Kuhn commented on patch set 2 CR -1 06/18/24, 13:54

    LogManager.php:145 Unresolved

    mmmmh. hackish. the true solution is to get rid of manual constructor arguments in log writers. same is true for LogManager itself as well.
  8. Eike Starkmann commented on patch set 2 06/18/24, 14:52

    Do you mean AbstractWrite::public function __construct(array $options = []) ?
  9. Christian Kuhn commented on patch set 2 06/21/24, 14:45

    Reply Unresolved

    yeah. "polluted" constructors (constructors not free for DI because they have manual arguments) are a *massive* problem in current core. in this case it's on an abstract, which is even worse (abstracts should never have a constructor at all, and if they need DI, they should use inject* methods). problem is: getting rid of those __construct is often quite breaking and needs manual mitigation thoughts per case, which makes these changes rather painful.
  10. Benni Mack updated the commit message in patch set 3 CR +1 V +1 10/18/24, 13:33

  11. core-ci voted on patch set 3 V -1 10/18/24, 22:08 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/67996

  12. Benni Mack updated the commit message in patch set 4 V -1 04/22/26, 06:56

  13. core-ci voted on patch set 4 V -1 04/22/26, 11:37 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/100837

  14. Christian Kuhn wrote 06/18/26, 23:06

    Removed reviewer Christian Kuhn.
  15. Benni Mack commented on patch set 4 08/01/26, 10:10

    hey eike, please see my proposal here https://review.typo3.org/c/Packages/TYPO3.CMS/+/94827