Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[FrameworkBundle] Add support for route attributes in kernel controller methods#46115
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
489fbdc to1e248e2Compare
nicolas-grekas left a comment
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.
Nice :)
please add a line on the changelog of the component
we now need to update the recipe for symfony/routing 6.1
can you please send a PR ?
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
src/Symfony/Bundle/FrameworkBundle/Tests/Kernel/MicroKernelTraitTest.php OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
fancyweb commentedApr 20, 2022
Should we deprecate declaring routes with the |
nicolas-grekas commentedApr 20, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Deprecating always has a cost, which needs to be justified. What would be the justification for the migration cost? |
dunglas commentedApr 20, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
The "old" syntax still has use cases: for instance, you may want to register methods as controllers dynamically (using reflection or complex things like this). I would keep it (and it has been supported for years). However, we could update the docs to promote the new syntax. |
chalasr left a comment
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.
Cool
fabpot commentedApr 20, 2022
Thank you@dunglas. |
6e35580 to0ae445cCompare
Simplify creating single file projects using route attributes:
This will also allow removing these lines from the FrameworkBundle recipe:https://github.com/symfony/recipes/blob/master/symfony/routing/6.0/config/routes.yaml#L5-L7