Review main Merged

65449[FEATURE] Support autowired LoggerInterface injection

Benjamin Franzke CR +2 V +2 Normal +125 −11 updated 09/03/21, 08:51

Commit message

Logger instances may be required to be available during object
construction, LoggerAwareInterface isn't an option in that case.
Therefore LoggerInterface as constructor argument is now
autowired (if the service is configured to use autowiring)
and instantiated with an object-specific logger.

We add a symfony compiler pass that prepares an inline factory which
fetches the appropriate Logger instance from the LogManager.
One of the TYPO3 core classes that require this is the Scheduler.

Scheduler used to contain a safety net which fetches a logger instance
from LogManager in case the logger is already needed during the
constructor invocation. In that case the logger was not available, as it
was injected via setter injection (setLogger) later
(per LoggerAwareInterface).

Review

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

Issues 1

Files 4

Review log 1522

  1. Benjamin Franzke uploaded patch set 1 08/25/20, 08:25

  2. TYPO3com voted on patch set 1 V -1 08/25/20, 08:37 Completed build in 11m 59s on Tue, 25 Aug, 08:37 AM Test Summary: 73072 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4936

  3. Benjamin Franzke uploaded patch set 2 08/25/20, 10:23

  4. TYPO3com voted on patch set 2 V -1 08/25/20, 10:46 Completed build in 19m 51s on Tue, 25 Aug, 10:46 AM Test Summary: 2 of 73561 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4943

  5. TYPO3com voted on patch set 2 V +1 08/25/20, 11:32 Completed build in 11m 47s on Tue, 25 Aug, 11:32 AM Test Summary: 73074 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4946

  6. Benni Mack commented on patch set 2 06/14/21, 11:31

    Should we push this forward as Feature v11?
  7. Benjamin Franzke uploaded patch set 3 08/31/21, 07:30

  8. Benjamin Franzke commented on patch set 3 08/31/21, 07:30

    Reply

    Yea, I mean, while Larry is working on monolog https://review.typo3.org/c/Packages/TYPO3.CMS/+/70014 …that monolog integration seems not really to be "finished" to me, so it would be useful to have this as feature for v11 anyway.
  9. core-ci voted on patch set 3 V -1 08/31/21, 07:50 Core CI is not happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15908

  10. Benjamin Franzke uploaded patch set 4 08/31/21, 08:10

  11. core-ci voted on patch set 4 V +1 08/31/21, 08:27 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/15911

  12. Benni Mack commented on patch set 4 09/02/21, 10:06

    Scheduler.php:37

    you can use PHP 7.4 typed properties here.

    Scheduler.php:484

    looks weird. this would mean "[scheduler]:" is added twice.
  13. Benjamin Franzke uploaded patch set 5 09/02/21, 11:48

  14. Benjamin Franzke commented on patch set 5 09/02/21, 11:48

    Scheduler.php:37 Reply

    Ack

    Scheduler.php:484 Reply

    oops, mistake during rebase. Fixed.
  15. core-ci voted on patch set 5 V +1 09/02/21, 12:05 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16070

  16. Nikita Hovratov voted on patch set 5 V +1 CR +1 09/02/21, 14:53

  17. Benjamin Franzke uploaded patch set 6 09/02/21, 21:27

  18. core-ci voted on patch set 6 V +1 09/02/21, 21:44 Core CI is happy: https://gitlab.typo3.org/typo3/CI/cms/-/pipelines/16138

  19. Benni Mack voted on patch set 6 V +1 CR +1 09/03/21, 06:58

  20. Nikita Hovratov voted on patch set 6 V +1 CR +1 09/03/21, 07:49

  21. Benjamin Franzke voted on patch set 6 V +2 CR +2 09/03/21, 08:51

  22. Benjamin Franzke merged patch set 7 09/03/21, 08:51