Actions
Feature #101544
closedAutoregister EventListener via PHP Attribute
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2023-08-03
Due date:
% Done:
100%
Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:
Description
With Version 12 the autodetecting of the Event was introduced, but you still have to add the EventListener to your Service.yaml/Service.php file.
It would be nice to have a PHP-Attribute like #[EventListener] to autoregister it.
I think this could be easily archived be merging the classes of the attribute and the TaggedServiceIds (https://github.com/TYPO3/typo3/blob/5b6775e962aa455559146c1f29bb54a9fa4ba5a5/typo3/sysext/core/Classes/DependencyInjection/ListenerProviderPass.php#L78)
Actions