This is because when you use the AsMessageHandler attribute, Symfony creates a separate service for the handler, and this service has its own name. Therefore, when you run the debug:messenger command, you will see both the original service and the new service created by Symfony.
For example, if you have a service named "MyHandlerService" and you add the AsMessageHandler attribute to it, Symfony will create a new service named "messenger.handler.MyHandlerService". When you run the debug:messenger command, you will see both "MyHandlerService" and "messenger.handler.MyHandlerService".
Asked: 2023-07-05 12:08:49 +0000
Seen: 13 times
Last updated: Jul 05 '23