Review main Merged

94227[TASK] Dissolve LoggerAwareInterface in various services

Christian Kuhn CR +2 V +2 Normal +94 −137 updated 06/01/26, 11:42

Commit message

LoggerAwareInterface especially in combination with
LoggerAwareTrait prevents services from being declared
readonly. That's one reason to reduce LoggerAwareInterface
usages.

The patch converts a set of straightforward, container
managed consumers to constructor injection, drops the
interface and the trait from them.

Review

  • Code review CR +2 Done
    • Christian Kuhn +2
    • Oliver Klee +1
    • Stefan Bürk +1
  • Verified V +2 Done
    • Christian Kuhn +2
    • Oliver Klee +1
    • Stefan Bürk +1
    • core-ci +1 CI

Issues 1

Files 20

Review log 1319

  1. Christian Kuhn uploaded patch set 1 05/31/26, 00:34

  2. core-ci voted on patch set 1 V -1 05/31/26, 00:42 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102705

  3. Christian Kuhn uploaded patch set 2 V -1 05/31/26, 00:53

  4. Christian Kuhn uploaded patch set 3 05/31/26, 00:55

  5. Christian Kuhn uploaded patch set 4 05/31/26, 00:59

  6. core-ci voted on patch set 2 V -1 05/31/26, 01:02 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102706

  7. core-ci voted on patch set 3 V +1 05/31/26, 01:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102707

  8. core-ci voted on patch set 4 V +1 05/31/26, 01:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102708

  9. Christian Kuhn updated the commit message in patch set 5 V +1 05/31/26, 01:17

  10. core-ci voted on patch set 5 V +1 05/31/26, 01:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102710

  11. Oliver Klee commented on patch set 5 V +1 05/31/26, 09:24

    Looks generally good. I think we can tighten some screws a bit more. I've added some comments for this.

    ImageProcessController.php:37

    Can be `private`. Ditto in many other classes that this change changes (haven't checked in detail). At least in the `@internal` classes, and maybe in all changed classes.

    PageContextInitialization.php:58

    AFAICS, we can make this class readonly now.

    InstallUtility.php:41

    Not used - good cleanup!
  12. Stefan Bürk voted on patch set 5 CR +1 V +1 05/31/26, 11:11

  13. Christian Kuhn commented on patch set 5 06/01/26, 11:24

    ImageProcessController.php:37 Reply

    Done here. The issue is that we still have no good guideline regarding protected vs. private DI services. I hope we can come up with something in the future, but for now, this is rather based on gut feelings: Going protected in this case is the least breaking decision. I'll however go through the cases in this patch and will switch to private in cases where other dependencies are private as well already, or where classes are more or less designed to be leaf-classes and/or unlikely to be xclassed. This strategy narrows this one down to private, but leaves more troublesome cases with protected.

    PageContextInitialization.php:58 Reply

    thx. good catch.
  14. Christian Kuhn uploaded patch set 6 CR +1 V +1 06/01/26, 11:24

  15. core-ci voted on patch set 6 V +1 06/01/26, 11:32 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/102756

  16. Oliver Klee voted on patch set 6 CR +1 V +1 06/01/26, 11:34

  17. Stefan Bürk voted on patch set 6 CR +1 V +1 06/01/26, 11:34

  18. Christian Kuhn voted on patch set 6 CR +2 V +2 06/01/26, 11:41

  19. Christian Kuhn merged patch set 7 06/01/26, 11:42