Skip to content

[Routing] Fix conflicting FQCN aliases with route name #52805

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

Merged

Conversation

fancyweb
Copy link
Contributor

Q A
Branch? 6.4
Bug fix? yes
New feature? no
Deprecations? no
Issues #52801
License MIT

When the route name === the FQCN alias we want to add, addAlias() throws. In this case, we can safely ignore the exception and move on.


use Symfony\Component\Routing\Attribute\Route;

#[Route(path: '/foobarccc', name: self::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 added only this test fixture case but the 3 FQCN aliases are susceptible to fail.

@fancyweb fancyweb force-pushed the routing/fix-fqcn-aliases-conflict branch from 3c02106 to bb04dd5 Compare November 29, 2023 15:45
@fancyweb fancyweb force-pushed the routing/fix-fqcn-aliases-conflict branch from bb04dd5 to 96a0d41 Compare November 29, 2023 15:47
@fancyweb fancyweb force-pushed the routing/fix-fqcn-aliases-conflict branch from 96a0d41 to 18494c8 Compare November 29, 2023 15:48
@nicolas-grekas
Copy link
Member

Thank you @fancyweb.

@nicolas-grekas nicolas-grekas merged commit 83d0106 into symfony:6.4 Nov 29, 2023
@fancyweb fancyweb deleted the routing/fix-fqcn-aliases-conflict branch November 29, 2023 15:53
This was referenced Dec 1, 2023
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.

4 participants