80309[FEATURE] Introduce PHP attribute to autoconfigure event listeners
Commit message
Review
-
Code review CR +2 Done
- Oli Bartsch +2
- Andreas Kienast +1
-
Verified V +2 Done
- Oli Bartsch +2
- Andreas Kienast +1
- core-ci +1 CI
Issues 1
Files 3
Review log 1622
-
Sascha Nowak uploaded patch set 1 08/03/23, 12:09
-
core-ci voted on patch set 1 V -1 08/03/23, 12:16 Core CI is not happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44924
-
Sascha Nowak uploaded patch set 2
V -108/03/23, 12:18 -
core-ci voted on patch set 2 V +1 08/03/23, 12:25 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44925
-
Mathias Brodala commented on patch set 2 08/03/23, 12:39
Why not use the one from Symfony? See https://symfony.com/doc/current/event_dispatcher.html#defining-event-listeners-with-php-attributes -
Sascha Nowak commented on patch set 2 08/03/23, 13:29
Reply
The symfony event is not fully api compatible as it uses priority instead of before and after. If these two properties are not relevant at all, I can remove my own implementation and use the symfony attribute -
Mathias Brodala commented on patch set 2 08/03/23, 13:35
Reply
True, that's a considerable difference. So a custom attribute for TYPO3 makes sense. Maybe consider using the same name: https://github.com/symfony/symfony/pull/40556 -
Sascha Nowak uploaded patch set 3
V +108/03/23, 16:27 -
core-ci voted on patch set 3 V +1 08/03/23, 16:35 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44933
-
Oli Bartsch commented on patch set 3 08/03/23, 19:23
Great patch! Works already quite well! Could you please check my remarks, which are mostly just documentation things?Please let's add a commit message, describing what this patch does in more detail.AsEventListener.php:20This import is unused.Feature-101544-IntroducePHPAttributeToAutoconfigureEventListeners.rst:24Let's add something like "The attributes is repeatable, which allows to register the same class to listen for different events."Feature-101544-IntroducePHPAttributeToAutoconfigureEventListeners.rst:45I think it would be great to show a migration from Services.yaml definition to using the attribute.Feature-101544-IntroducePHPAttributeToAutoconfigureEventListeners.rst:50Could we please mention the reason here again => auto tagging => auto configuration? -
Sascha Nowak uploaded patch set 4
V +108/03/23, 20:20 -
Sascha Nowak commented on patch set 4 08/03/23, 20:22
Reply
DoneHey Oliver, thanks for your feedbackReply
DoneAsEventListener.php:20ReplyDoneFeature-101544-IntroducePHPAttributeToAutoconfigureEventListeners.rst:24ReplyDoneFeature-101544-IntroducePHPAttributeToAutoconfigureEventListeners.rst:45ReplyDoneFeature-101544-IntroducePHPAttributeToAutoconfigureEventListeners.rst:50ReplyDone -
core-ci voted on patch set 4 V +1 08/03/23, 20:43 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44968
-
Oli Bartsch uploaded patch set 5
V +108/03/23, 20:45 -
Oli Bartsch commented on patch set 5 V +1 CR +1 08/03/23, 20:46
Reply
Done -
Oli Bartsch uploaded patch set 6
CR +1V +108/03/23, 20:50 -
Andreas Kienast voted on patch set 6 V +1 CR +1 08/03/23, 20:50
-
Oli Bartsch voted on patch set 6 V +1 CR +1 08/03/23, 20:51
-
core-ci voted on patch set 6 V +1 08/03/23, 21:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44976
-
core-ci voted on patch set 5 V +1 08/03/23, 21:00 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/44975
-
Oli Bartsch voted on patch set 6 V +2 CR +2 08/03/23, 21:03
-
Oli Bartsch merged patch set 7 08/03/23, 21:04