Feature #101544
closedAutoregister EventListener via PHP Attribute
100%
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)
Updated by Sascha Nowak over 1 year ago
- Subject changed from Autoregister EventListener via PHP Annotation to Autoregister EventListener via PHP Attribute
Updated by Gerrit Code Review over 1 year ago
- Status changed from New to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80309
Updated by Gerrit Code Review over 1 year ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80309
Updated by Gerrit Code Review over 1 year ago
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80309
Updated by Gerrit Code Review over 1 year ago
Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80309
Updated by Gerrit Code Review over 1 year ago
Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80309
Updated by Gerrit Code Review over 1 year ago
Patch set 6 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/80309
Updated by Sascha Nowak over 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset d1cd00f3238bbc4746f511002137d03747697a15.
Updated by Oliver Bartsch over 1 year ago
- Related to Feature #101573: Improve event listener registration added
Updated by Chris Müller over 1 year ago
- Related to Task #101693: Fix code examples for tagging event listeners with PHP attribute added