Skip to content
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

Allow listening to Abstract events #9

Open
kpicaza opened this issue Jun 18, 2020 · 0 comments
Open

Allow listening to Abstract events #9

kpicaza opened this issue Jun 18, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@kpicaza
Copy link
Member

kpicaza commented Jun 18, 2020

Is your feature request related to a problem? Please describe.
At the moment the dispatcher only makes match by exact class coincidence, it would be great to have the ability to listen to abstract classes or interfaces too

Describe the solution you'd like
Instead of checking only for exact class check for parents too

For example, using it with antidot framework starter you need a config like that:

services:
  App\Application\EventListener\QueueLogWriter:
    tags:
      - { name: 'event_listener', event: 'Antidot\Queue\Event\MessageProcessed' }
      - { name: 'event_listener', event: 'Antidot\Queue\Event\MessageReceived' }
      - { name: 'event_listener', event: 'Antidot\Queue\Event\QueueConsumerStarted' }

Listening to parent class it will look like this

services:
  App\Application\EventListener\QueueLogWriter:
    tags:
      - { name: 'event_listener', event: 'Antidot\Queue\Event\QueueEvent' }
@kpicaza kpicaza added the enhancement New feature or request label Jun 18, 2020
@kpicaza kpicaza self-assigned this Jun 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant