-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Route definitions incompatible with symfony/routing: 6.4.0
#52801
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
Comments
The issue was introduced in #50084. The simplest solution would be to remove -#Route(path: '/foobar', name: self::class)
+#Route(path: '/foobar')
class FoobarController
{
} |
That's not possible if your code needs to stay compatible with all currently supported versions of |
Also, is this feature working correctly? When executing
I do not see any automatic FQCN aliases. But may be they are not supposed to. |
Seems to be working in my case, but I've removed all the |
Thank you for your report, I'll have a look. |
…ncyweb) This PR was merged into the 6.4 branch. Discussion ---------- [Routing] Fix conflicting FQCN aliases with route name | 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. Commits ------- 18494c8 [Routing] Fix conflicting FQCN aliases with route name
Symfony version(s) affected
6.4.0
Description
Currently I usually define my routes this way:
This way I can use the FQCN to generate the controller's URL:
This definition does not work in Symfony
6.4.0
anymore:Changing the definition to
or another name for the route fixes the error, but I want to use the FQCN as the route name.
How to reproduce
Create a controller like this:
Then execute a
cache:warmup
.Possible Solution
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: