8000 conflict with AnnotationFileLoader and PHP8 attributes · Issue #40225 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

conflict with AnnotationFileLoader and PHP8 attributes #40225

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
nlhommet opened this issue Feb 17, 2021 · 1 comment · Fixed by #40244
Closed

conflict with AnnotationFileLoader and PHP8 attributes #40225

nlhommet opened this issue Feb 17, 2021 · 1 comment · Fixed by #40244

Comments

@nlhommet
Copy link
Contributor

Symfony version(s) affected: 5.2.x

PHP version: 8.x

Description
When an attribute has a parameter named class before the class declaration, the script tries to load the content of that parameter.

...
#[ParamConverter(
    'availability',
    class: Table\Availability::class,
    options: ['id' => 'ida']
)]
...
class EditController
{
...

How to reproduce
See issue https://github.com/sensiolabs/SensioFrameworkExtraBundle/issues/713 for more detail

Possible Solution
See here https://github.com/sensiolabs/SensioFrameworkExtraBundle/issues/713#issuecomment-780669307

@nicolas-grekas
Copy link
Member

Could you please send a PR with some tests so that we can discuss the fix?

nicolas-grekas added a commit that referenced this issue Feb 22, 2021
… (nlhommet)

This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Routing] fix conflict with param named class in attribute

| Q             | A
| ------------- | ---
| Branch        | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | Fix #40225
| License       | MIT
| Doc PR        | -

Fix conflict with AnnotationFileLoader and class PHP8 Attribute with param named "class"

Commits
-------

27bba68 [Routing] fix conflict with param named class in attribute
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
0