File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
src/Symfony/Component/Config/Resource Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -155,12 +155,16 @@ private function generateSignature(\ReflectionClass $class)
155155 }
156156 }
157157
158- if ($ class ->isSubclassOf (EventSubscriberInterface::class)) {
158+ if ($ class ->isAbstract () || $ class ->isInterface () || $ class ->isTrait ()) {
159+ return ;
160+ }
161+
162+ if (interface_exists (EventSubscriberInterface::class, false ) && $ class ->isSubclassOf (EventSubscriberInterface::class)) {
159163 yield EventSubscriberInterface::class;
160164 yield print_r (\call_user_func (array ($ class ->name , 'getSubscribedEvents ' )), true );
161165 }
162166
163- if ($ class ->isSubclassOf (ServiceSubscriberInterface::class)) {
167+ if (interface_exists (ServiceSubscriberInterface::class, false ) && $ class ->isSubclassOf (ServiceSubscriberInterface::class)) {
164168 yield ServiceSubscriberInterface::class;
165169 yield print_r (\call_user_func (array ($ class ->name , 'getSubscribedServices ' )), true );
166170 }
You can’t perform that action at this time.
0 commit comments