Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Config] ReflectionClassResource check abstract class#26400
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
jakzal commentedMar 8, 2018 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
|
andrey1s commentedMar 8, 2018
@jakzal yes, add issue |
| if ($class->isSubclassOf(ServiceSubscriberInterface::class)) { | ||
| yield ServiceSubscriberInterface::class; | ||
| yieldprint_r(\call_user_func(array($class->name,'getSubscribedServices')),true); | ||
| if (!$class->isAbstract()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
should also check forisInterface()
| if ($class->isSubclassOf(EventSubscriberInterface::class)) { | ||
| yield EventSubscriberInterface::class; | ||
| yieldprint_r(\call_user_func(array($class->name,'getSubscribedEvents')),true); | ||
| if (!$class->isAbstract()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
the check should be merged in the above "if", no need to yieldEventSubscriberInterface::class
(same below, and I agree with@chalasr comment below also)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
or, just before the current two checks, we could just add
if ($class->isAbstract() || $class->isInterface()) { return;}…rface and EventSubscriberInterface
nicolas-grekas left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
(comments addressed by push-forcing on the fork)
fabpot commentedMar 13, 2018
Thank you@andrey1s. |
…rey1s)This PR was merged into the 3.4 branch.Discussion----------[Config] ReflectionClassResource check abstract classgenerate Signatureupdate hash methods `ServiceSubscriberInterface::getSubscribedServices` and `EventSubscriberInterface::getSubscribedEvents` if the class is not abstract| Q | A| ------------- | ---| Branch? | 3.4| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#26459,#26501| License | MITCommits-------e851514 [Config] ReflectionClassResource check abstract ServiceSubscriberInterface and EventSubscriberInterface
Uh oh!
There was an error while loading.Please reload this page.
generate Signature
update hash methods
ServiceSubscriberInterface::getSubscribedServicesandEventSubscriberInterface::getSubscribedEventsif the class is not abstract