Closed
Description
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | ? |
RFC? | no |
Symfony version | 4.0.5 |
Cannot create an interface that extends EventSubscriberInterface
because the ReflectionClassResource
is not considering an inheritence of this interface.
The temporary solution is to get the interface out of autowiring namespace.
Exclusion from autowiring does not work.
The conflicting code is this:
if ($class->isSubclassOf(EventSubscriberInterface::class)) {
yield EventSubscriberInterface::class;
yield print_r(\call_user_func(array($class->name, 'getSubscribedEvents')), true);
}
The error:
Warning: call_user_func() expects parameter 1 to be a valid callback, cannot call abstract method App\Event\SubscriberInterface::getSubscribedEvents()