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)
155
155
}
156
156
}
157
157
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)) {
159
163
yield EventSubscriberInterface::class;
160
164
yield print_r (\call_user_func (array ($ class ->name , 'getSubscribedEvents ' )), true );
161
165
}
162
166
163
- if ($ class ->isSubclassOf (ServiceSubscriberInterface::class)) {
167
+ if (interface_exists (ServiceSubscriberInterface::class, false ) && $ class ->isSubclassOf (ServiceSubscriberInterface::class)) {
164
168
yield ServiceSubscriberInterface::class;
165
169
yield print_r (\call_user_func (array ($ class ->name , 'getSubscribedServices ' )), true );
166
170
}
You can’t perform that action at this time.
0 commit comments