You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks to symfony-frameworks registerForAutoconfiguration the ExampleHandler is tagged as messenger.message_handler, as the class (indirect) implements the interface.
abstract classes aren't considered a service, and therefore no tagging is happening
the ExampleHandler has no attribute to it and doesn't get the tag added.
Possible solution:
I would recommend to add final to all modified classes. This prevents extending a message handler service and expecting to automaticly get tagged. Any wrong usages are instantly visible.
Just skipping abstract classes wouldn't be sufficient, as some may also extend a non abstract service.
The text was updated successfully, but these errors were encountered:
Example:
Thanks to symfony-frameworks
registerForAutoconfiguration
the ExampleHandler is tagged asmessenger.message_handler
, as the class (indirect) implements the interface.Result after rector:
No service gets tagged:
Possible solution:
I would recommend to add
final
to all modified classes. This prevents extending a message handler service and expecting to automaticly get tagged. Any wrong usages are instantly visible.Just skipping abstract classes wouldn't be sufficient, as some may also extend a non abstract service.
The text was updated successfully, but these errors were encountered: