Skip to content

[Messenger] Scope handlers per bus & PSR4 discovery #10477

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
ogizanagi opened this issue Oct 12, 2018 · 0 comments
Closed

[Messenger] Scope handlers per bus & PSR4 discovery #10477

ogizanagi opened this issue Oct 12, 2018 · 0 comments

Comments

@ogizanagi
Copy link
Contributor

Original PR: symfony/symfony#27275

We should highlight the usage with psr4 discovery for which it works especially great:

command_handlers:
    namespace: App\Message\
    resource: '%kernel.project_dir%/src/Message/*CommandHandler.php'
    tags:
        - { name: messenger.message_handler, bus: command_bus }

query_handlers:
    namespace: App\Message\
    resource: '%kernel.project_dir%/src/Message/*QueryHandler.php'
    tags:
        - { name: messenger.message_handler, bus: query_bus }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant