Skip to content

[Router] Skip anonymous classes when loading annotated routes #25801

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

pierredup
Copy link
Contributor

@pierredup pierredup commented Jan 15, 2018

Q A
Branch? 2.7
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #25796
License MIT
Doc PR

Skip any usage of anonymous classes when parsing files in AnnotationFileLoader

@pierredup pierredup force-pushed the anonymous-class-in-trait branch 3 times, most recently from e016c78 to 91c878e Compare January 15, 2018 20:40
@pierredup pierredup force-pushed the anonymous-class-in-trait branch from e6cb583 to 3a272b2 Compare January 16, 2018 06:57
// Skip usage of ::class constant
$isClassConstant = false;
// Skip usage of ::class constant and anonymous classes
$isValidClass = true;
Copy link
Member

Choose a reason for hiding this comment

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

Not sure about this variable name -> $isValidClass because an anonymous class is a valid class.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was mostly trying to avoid using isClassConstantOrAnonymousClass and isValidClass is the first thing that came to mind. I'll change it to something more reasonable

@nicolas-grekas nicolas-grekas added this to the 2.7 milestone Jan 16, 2018
@nicolas-grekas
Copy link
Member

Thank you @pierredup.

nicolas-grekas added a commit that referenced this pull request Jan 16, 2018
…tes (pierredup)

This PR was squashed before being merged into the 2.7 branch (closes #25801).

Discussion
----------

[Router] Skip anonymous classes when loading annotated routes

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #25796
| License       | MIT
| Doc PR        |

Skip any usage of anonymous classes when parsing files in `AnnotationFileLoader`

Commits
-------

d76a545 [Router] Skip anonymous classes when loading annotated routes
@xabbuh xabbuh closed this Jan 16, 2018
@pierredup pierredup deleted the anonymous-class-in-trait branch January 16, 2018 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants