Review main Merged

65405[BUGFIX] Provide EventDispatcher and Logger to transports

Simon Gilli CR +2 V +2 Hard +428 −37 updated 10/15/20, 09:22

Commit message

The EventDispatcherInterface and LoggerInterface are now provided to
newly created Symfony\Component\Mailer\Transport\AbstractTransport
decendents. This makes sure all provided events are available.

To be compatible with the Symfony's events interface an adapter is
added which conforms to symfony/event-dispatcher-contracts.

Used composer commands:
- composer require symfony/event-dispatcher-contracts:^2.0 --no-update \
    --working-dir=typo3/sysext/core
- composer require symfony/event-dispatcher-contracts:^2.0 --no-update
- composer update --lock

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Benjamin Franzke +1
    • Markus Gerdes +1
  • Verified V +2 Done
    • Benni Mack +2
    • Markus Gerdes +1
    • TYPO3com +1 CI

Issues 1

Files 9

Review log 3560

Show 1935 earlier messages
  1. Simon Gilli uploaded patch set 1 08/21/20, 12:42

  2. TYPO3com voted on patch set 1 V -1 08/21/20, 13:12 Completed build in 29m 40s on Fri, 21 Aug, 01:12 PM Test Summary: 5388 of 73481 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4801

  3. Simon Gilli uploaded patch set 2 08/21/20, 14:59

  4. TYPO3com voted on patch set 2 V -1 08/21/20, 15:00 Completed build in 40s on Fri, 21 Aug, 03:00 PM Test Summary: No tests found Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4810

  5. Simon Gilli uploaded patch set 3 08/21/20, 15:03

  6. Simon Gilli uploaded patch set 4 08/21/20, 15:10

  7. TYPO3com voted on patch set 3 V -1 08/21/20, 15:15 Completed build in 12m 07s on Fri, 21 Aug, 03:15 PM Test Summary: 3 of 73481 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4811

  8. TYPO3com voted on patch set 4 V -1 08/21/20, 15:28 Completed build in 17m 47s on Fri, 21 Aug, 03:28 PM Test Summary: 12 of 73481 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4813

  9. TYPO3com commented on patch set 4 08/21/20, 15:43 Completed build in 10m 55s on Fri, 21 Aug, 03:43 PM Test Summary: 12 of 73481 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4815

  10. Simon Gilli updated the commit message in patch set 5 08/21/20, 16:05

  11. TYPO3com voted on patch set 5 V -1 08/21/20, 16:22 Completed build in 15m 44s on Fri, 21 Aug, 04:22 PM Test Summary: 12 of 73481 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4820

  12. Simon Gilli uploaded patch set 6 08/21/20, 19:03

  13. TYPO3com voted on patch set 6 V -1 08/21/20, 19:15 Completed build in 12m 11s on Fri, 21 Aug, 07:15 PM Test Summary: 12 of 73481 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4825

  14. Simon Gilli uploaded patch set 7 08/22/20, 09:12

  15. TYPO3com voted on patch set 7 V -1 08/22/20, 09:25 Completed build in 12m 21s on Sat, 22 Aug, 09:25 AM Test Summary: 71697 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4840

  16. TYPO3com commented on patch set 7 08/22/20, 09:45 Completed build in 12m 52s on Sat, 22 Aug, 09:45 AM Test Summary: 1 of 73153 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4841

  17. TYPO3com voted on patch set 7 V +1 08/22/20, 09:56 Completed build in 36m 59s on Sat, 22 Aug, 09:56 AM Test Summary: 72996 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4841

  18. Markus Gerdes commented on patch set 7 V +1 CR +1 08/24/20, 09:11

    Tried this and the Symfony\Component\Mailer\Event\MessageEvent gets fired now
  19. Simon Gilli uploaded patch set 8 08/24/20, 09:21

  20. TYPO3com voted on patch set 8 V +1 08/24/20, 09:33 Completed build in 11m 38s on Mon, 24 Aug, 09:33 AM Test Summary: 73074 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4897

  21. Benjamin Franzke commented on patch set 8 CR -1 08/24/20, 09:48

    EventDispatcher.php:44

    I'm against this. Let's rather add an adapter that implements the symfony event dispatcher interface and injects the PSR EventDispatcherInterface service and forwards to that object. That way the event dispatcher service is still interchangable. Because, as seen with EXT:adminpanel, buy implicitly depending the implementation of Symfony\Contracts\EventDispatcher\EventDispatcherInterface, this becomes a) a breaking change and b) hinders from registering another (non symfony compatibly) PSR event dispatcher instead of the core one.

    TransportFactory.php:47

    Why nullable injection? We do always prefer non-nullable if possible. (and it should be possible here) Also it seems it is used unconditionally below, so it shouldn't be nullable.

    Services.yaml:191

    See above, no alias please, rather add an adapter, thanks.
  22. Simon Gilli commented on patch set 8 08/24/20, 10:26

    EventDispatcher.php:44 Reply

    > I'm against this. Let's rather add an adapter that implements the symfony event dispatcher interface and injects the PSR EventDispatcherInterface service and forwards to that object. That way the event dispatcher service is still interchangable. That was also my feeling here but I didn't see an other solution so far, so thanks for the hint, will try to change it...

    TransportFactory.php:47 Reply

    I did this to have a non breaking change. But will change now anyway...

    Services.yaml:191 Reply

    Ack
  23. Simon Gilli uploaded patch set 9 08/24/20, 14:08

  24. Simon Gilli commented on patch set 9 08/24/20, 14:11

    @bejamin please have a look again. I'm currently not sure of the nullable injection how to proceed here

    EventDispatcher.php:44 Reply

    Done

    TransportFactory.php:47 Reply Unresolved

    Still the same, if I do not allow a nullable injection here the change will be breaking and I have to change the tests. Is that really wanted?

    Services.yaml:191 Reply

    Done
  25. Simon Gilli uploaded patch set 10 08/24/20, 14:15

  26. Benjamin Franzke uploaded patch set 11 08/24/20, 14:46

  27. TYPO3com voted on patch set 11 V +1 08/24/20, 14:59 Completed build in 12m 29s on Mon, 24 Aug, 02:59 PM Test Summary: 73074 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4902

  28. Simon Gilli uploaded patch set 12 08/24/20, 15:22

  29. TYPO3com voted on patch set 12 V -1 08/24/20, 15:34 Completed build in 11m 30s on Mon, 24 Aug, 03:34 PM Test Summary: 60 of 73559 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4908

  30. Simon Gilli uploaded patch set 13 08/24/20, 16:39

  31. TYPO3com voted on patch set 13 V +1 08/24/20, 16:51 Completed build in 11m 57s on Mon, 24 Aug, 04:51 PM Test Summary: 73074 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4911

  32. Simon Gilli updated the commit message in patch set 14 08/24/20, 17:09

  33. TYPO3com voted on patch set 14 V +1 08/24/20, 17:22 Completed build in 12m 56s on Mon, 24 Aug, 05:22 PM Test Summary: 73072 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4914

  34. Simon Gilli uploaded patch set 15 08/24/20, 17:50

  35. TYPO3com voted on patch set 15 V -1 08/24/20, 18:02 Completed build in 11m 20s on Mon, 24 Aug, 06:02 PM Test Summary: 73072 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4918

  1. Simon Gilli uploaded patch set 16 08/24/20, 18:09

  2. TYPO3com voted on patch set 16 V +1 08/24/20, 18:21 Completed build in 11m 24s on Mon, 24 Aug, 06:21 PM Test Summary: 73074 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4920

  3. Simon Gilli uploaded patch set 17 08/24/20, 21:46

  4. Simon Gilli uploaded patch set 18 08/24/20, 21:50

  5. TYPO3com voted on patch set 17 V +1 08/24/20, 21:58 Completed build in 12m 30s on Mon, 24 Aug, 09:58 PM Test Summary: 73080 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4926

  6. TYPO3com voted on patch set 18 V +1 08/24/20, 22:02 Completed build in 11m 42s on Mon, 24 Aug, 10:02 PM Test Summary: 73080 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4927

  7. Benjamin Franzke uploaded patch set 19 08/25/20, 06:33

  8. TYPO3com voted on patch set 19 V -1 08/25/20, 06:50 Completed build in 16m 18s on Tue, 25 Aug, 06:50 AM Test Summary: 1 of 72267 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4928

  9. TYPO3com voted on patch set 19 V +1 08/25/20, 07:06 Completed build in 11m 53s on Tue, 25 Aug, 07:06 AM Test Summary: 73080 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4932

  10. TYPO3com commented on patch set 19 08/25/20, 07:10 Completed build in 15m 35s on Tue, 25 Aug, 07:10 AM Test Summary: 73080 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4933

  11. Benjamin Franzke voted on patch set 19 CR +1 08/25/20, 07:15

  12. Simon Gilli commented on patch set 19 CR -1 08/25/20, 10:09

    Will provide some more tests for other not already tested cases...
  13. Simon Gilli uploaded patch set 20 08/25/20, 15:56

  14. Simon Gilli uploaded patch set 21 08/25/20, 15:59

  15. Simon Gilli uploaded patch set 22 08/25/20, 16:03

  16. TYPO3com voted on patch set 20 V -1 08/25/20, 16:15 Completed build in 18m 38s on Tue, 25 Aug, 04:15 PM Test Summary: 46 of 72789 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4955

  17. TYPO3com voted on patch set 21 V -1 08/25/20, 16:16 Completed build in 16m 36s on Tue, 25 Aug, 04:16 PM Test Summary: 2 of 73553 failed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4956

  18. TYPO3com voted on patch set 22 V +1 08/25/20, 16:17 Completed build in 13m 38s on Tue, 25 Aug, 04:17 PM Test Summary: 73092 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-4957

  19. Benni Mack voted on patch set 22 CR +1 08/31/20, 07:30

  20. Benjamin Franzke voted on patch set 22 CR +1 08/31/20, 07:43

  21. Markus Gerdes commented on patch set 22 V +1 CR +1 08/31/20, 11:53

    Tested and locks good
  22. Benni Mack voted on patch set 22 V +2 CR +2 09/01/20, 06:38

  23. Benni Mack merged patch set 23 09/01/20, 06:38

  24. Markus Gerdes commented on patch set 23 10/13/20, 08:28

    Hi, just had some problems with the FileSpool again and found that we missed some places to add the constructor arguments here.

    TransportFactory.php:145

    Did we miss the dispatcher and logger here? Not quiet sure if this would be resolved automatically? Same would be for custom implementations and the FileSpool implementation. MemorySpool seems to get the object correctly injected?
  25. Simon Gilli commented on patch set 23 10/15/20, 09:22

    TransportFactory.php:145 Reply Unresolved

    Yes, you're right. But the MboxTransport misses currently this parameters in the constructor so this should go into a separate patch anyway.