-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Symfony HandleTrait #207
Comments
Did anybody take a look on that so far to give some insights? Today, I'm going to start working on this. |
So far, I researched that in current version not having of this feature request, it could be a blocker. but I'm keep digging 😉 |
I'm happy to announce that PR for that is done and ready for review here :) Feel free to review and give your feedback, thank you :) |
There's also another QueryBus-classes related topic which I wanted to cover with reusing this feature. It's described in this comment. If you have idea how to solve it, please share it here :) Thanks, again |
Implemented #404 |
I think it would be great if the extension could automatically recognize the type of
HandleTrait
of symfony.The given message to the handle trait example:
does only have 1 Handler which return type the return type of the handle trait will be. Example:
The
bin/console debug:messenger
already shows the mapping between Message and Handlers.The
HandleStamp
contains under thegetResult
method the result of every handler: https://github.com/symfony/symfony/blob/8eed84bb2df613101949ca2e786ac383d2f349fd/src/Symfony/Component/Messenger/HandleTrait.php#L45. The HandleTrait only allows one handler per message, that make the result recognize able. Not sure if its even possible to overwrite the result of a trait. Sadly my skillset for providing this myself is to low, but would think it would be a great feature.Currenty workaround is:
The first parameter of
console.command.messenger_debug
service would contain the mapping between message and handler so we can guess the type from there.The text was updated successfully, but these errors were encountered: