Closed
Description
Q | A |
---|---|
Bug report? | no |
Feature request? | yes |
BC Break report? | no |
RFC? | yes |
Symfony version | 4.1 |
With MessageSubscriberInterface::getHandledMessages()
we can return an array of classes that should be handled but this requires knowing the exact classes before hand. What if we wanted all messages that implement an interface to be handled by a handler?
One solution I came up with was to loop through get_declared_classes()
in MessageSubscriberInterface::getHandledMessages()
and return the classes that implement an interface but this seems clunky (and perhaps error prone).
Any thoughts on how we can handle this?