-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[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
Conversation
e016c78
to
91c878e
Compare
e6cb583
to
3a272b2
Compare
// Skip usage of ::class constant | ||
$isClassConstant = false; | ||
// Skip usage of ::class constant and anonymous classes | ||
$isValidClass = true; |
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.
Not sure about this variable name -> $isValidClass
because an anonymous class is a valid class.
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.
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
Thank you @pierredup. |
…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
Skip any usage of anonymous classes when parsing files in
AnnotationFileLoader