Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Merged
fabpot merged 1 commit intosymfony:3.4fromandrey1s:config/signature
Mar 13, 2018
Merged

[Config] ReflectionClassResource check abstract class#26400

fabpot merged 1 commit intosymfony:3.4fromandrey1s:config/signature
Mar 13, 2018

Conversation

@andrey1s
Copy link

@andrey1sandrey1s commentedMar 5, 2018
edited by nicolas-grekas
Loading

generate Signature
update hash methodsServiceSubscriberInterface::getSubscribedServices andEventSubscriberInterface::getSubscribedEvents if the class is not abstract

QA
Branch?3.4
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#26459,#26501
LicenseMIT

@andrey1sandrey1s changed the base branch frommaster to4.0March 5, 2018 09:11
@andrey1sandrey1s reopened thisMar 5, 2018
@andrey1sandrey1s changed the base branch from4.0 to3.4March 5, 2018 09:14
@andrey1sandrey1s changed the base branch from3.4 to4.0March 5, 2018 09:15
@andrey1sandrey1s changed the base branch from4.0 to3.4March 5, 2018 09:20
@jakzal
Copy link
Contributor

jakzal commentedMar 8, 2018
edited
Loading

What's the problem you're fixing here? Does it fix#26459?

@andrey1s
Copy link
Author

@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()) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

should also check forisInterface()

@nicolas-grekasnicolas-grekas added this to the3.4 milestoneMar 12, 2018
if ($class->isSubclassOf(EventSubscriberInterface::class)) {
yield EventSubscriberInterface::class;
yieldprint_r(\call_user_func(array($class->name,'getSubscribedEvents')),true);
if (!$class->isAbstract()) {

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)

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;}

Copy link
Member

@nicolas-grekasnicolas-grekas left a 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
Copy link
Member

Thank you@andrey1s.

@fabpotfabpot merged commite851514 intosymfony:3.4Mar 13, 2018
fabpot added a commit that referenced this pull requestMar 13, 2018
…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
@andrey1sandrey1s deleted the config/signature branchMarch 13, 2018 13:22
This was referencedApr 3, 2018
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@chalasrchalasrchalasr approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

3.4

Development

Successfully merging this pull request may close these issues.

6 participants

@andrey1s@jakzal@fabpot@nicolas-grekas@chalasr@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp