Review main Merged

90318[FEATURE] Introduce PSR-14 Event to modify options in EmailFinisher

Albrecht Köhnlein CR +2 V +2 Normal +240 −0 updated 08/13/25, 17:16

Commit message

The new PSR-14 BeforeEmailFinisherInitializedEvent
is introduced. It allows Listeners to modify
the options, used by the EmailFinisher.

Possible use cases might be unsetting
recipients or to changing the subject
of the mail.

Review

  • Code review CR +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • Christian Kuhn +1
  • Verified V +2 Done
    • Benni Mack +2
    • Oli Bartsch +1
    • core-ci +1 CI

Issues 1

Files 4

Review log 2130

Show 45 earlier messages
  1. Albrecht Köhnlein uploaded patch set 1 08/11/25, 13:26

  2. Albrecht Köhnlein commented on patch set 1 08/11/25, 13:30

    Question to core members: As this has no negativ impact, would there be a theoretical chance to also have this merged into 13.4? What could I do to make this possible?
  3. core-ci voted on patch set 1 V -1 08/11/25, 13:38 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83145

  4. Albrecht Köhnlein uploaded patch set 2 V -1 08/11/25, 13:55

  5. Albrecht Köhnlein uploaded patch set 3 08/11/25, 14:03

  1. core-ci voted on patch set 2 V -1 08/11/25, 14:05 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83146

  2. Albrecht Köhnlein uploaded patch set 4 08/11/25, 14:10

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

  4. core-ci voted on patch set 4 V +1 08/11/25, 14:17 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83148

  5. Josua Vogel commented on patch set 4 V -1 08/11/25, 15:07

    I don't think there should be an event for this specific case. At most, I could imagine a general event for every finisher that allows you to manipulate the options. btw: we have written our own finishers for such special use cases.
  6. Albrecht Köhnlein commented on patch set 4 08/11/25, 15:12

    Reply

    There never can be too much events. They don't hurt anybody. And I also thought about a general event in `AbstractFinisher::execute()`. But then I decided to not propose it, because a inaccurate used event could cause to much trouble in all finishers by accident. In my opinion, having an explicit event is the better idea.
  7. Josua Vogel voted on patch set 4 V 0 08/11/25, 18:27

  8. Oli Bartsch commented on patch set 4 08/12/25, 14:12

    Reply

    Since new Events require documentation and introduce new functionality, they are classified as Features and therefore cannot be backported. Recently, there have been discussions about whether Events might be an exception to this rule, but as of now, no such exception exists.

    EmailFinisherPrepareOptionsEventTest.php:25

    Please doo not introduce unit tests for events. Let's add proper functional test. You could test the event itself but at least test that the event is actually dispatched in EmailFinisher ant that the result is used in further code. You can grep for "EventIsCalled()" to find similar tests.
  9. Albrecht Köhnlein uploaded patch set 5 V +1 08/12/25, 20:19

  10. Albrecht Köhnlein uploaded patch set 6 08/12/25, 20:25

  11. core-ci voted on patch set 5 V -1 08/12/25, 20:28 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83240

  12. core-ci voted on patch set 6 V +1 08/12/25, 20:33 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83242

  13. Oli Bartsch uploaded patch set 7 V +1 08/12/25, 21:47

  14. core-ci voted on patch set 7 V +1 08/12/25, 21:54 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83251

  15. Oli Bartsch commented on patch set 7 CR +1 V +1 08/12/25, 22:00

    Feature-107256-EmailFinisherPrepareOptionsEvent.rst Reply

    Thanks! While I renamed the event to better match the existing ones, I've also adjusted the RST a bit to add more information.

    EmailFinisherPrepareOptionsEventTest.php:25 Reply

    Done
  16. Oli Bartsch updated the commit message in patch set 8 CR +1 V +1 08/12/25, 22:02

  17. Oli Bartsch voted on patch set 8 CR +1 V +1 08/12/25, 22:02

  18. Christian Kuhn commented on patch set 7 CR -1 08/12/25, 22:03

    EmailFinisher.php:63

    it is EventDispatcherInterface, is it?
  19. core-ci voted on patch set 8 V +1 08/12/25, 22:09 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83252

  20. Oli Bartsch uploaded patch set 9 CR +1 V +1 08/13/25, 06:04

  21. Oli Bartsch commented on patch set 9 CR +1 V +1 08/13/25, 06:04

    EmailFinisher.php:63 Reply

    Oh, yes. Good Catch!
  22. core-ci voted on patch set 9 V +1 08/13/25, 06:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/83272

  23. Christian Kuhn voted on patch set 9 CR +1 08/13/25, 11:30

  24. Benni Mack voted on patch set 9 CR +2 V +2 08/13/25, 17:16

  25. Benni Mack merged patch set 10 08/13/25, 17:16