Skip to content

[Messenger] Add AsMessageHandler attribute to declare message handlers #41202

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

Closed

Conversation

maxim-dovydenok
Copy link
Contributor

@maxim-dovydenok maxim-dovydenok commented May 12, 2021

Q A
Branch? 5.4
Bug fix? no
New feature? yes
Deprecations? no
Tickets Fix #41106
License MIT
Doc PR symfony/symfony-docs#...

Added AsMessageHandler attribute to autoconfigure message handler

@chalasr chalasr added this to the 5.x milestone May 14, 2021
@OskarStark OskarStark changed the title [Messenger] Add AsMessageHandler attribute to declare message handlers [Messenger] Add AsMessageHandler attribute to declare message handlers Aug 1, 2021
*/
#[\Attribute(\Attribute::TARGET_CLASS)]
class AsMessageHandler
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's also possible to configure an optional bus and from_transport on the messenger.message_handler. Maybe that should be added to the attribute as well?

https://symfony.com/doc/current/messenger.html#manually-configuring-handlers

@nicolas-grekas
Copy link
Member

Closing in favor of #43588
Thanks for opening.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Messenger] Message attributes
6 participants