-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Routing] add priority option to annotated routes #35608
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
9651a4c
to
8522a83
Compare
Thank you @nicolas-grekas. |
…olas-grekas) This PR was merged into the 5.1-dev branch. Discussion ---------- [Routing] add priority option to annotated routes | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | Deprecations? | yes | Tickets | Fix #26132 | License | MIT | Doc PR | - This PR allows defining the priority of routes using annotations: `@Route(name="foo", priority=10)` As requested [in this comment](#26132 (review)), priority is reserved to using annotations. For other formats, the order works fine. Commits ------- 8522a83 [Routing] add priority option to annotated routes
thank you, I was waiting for this more than 1 year 👍 |
Reading here https://symfony.com/blog/new-in-symfony-5-1-route-annotations-priority and here https://symfony.com/doc/current/routing.html#priority-parameter it is not clear if the "priority" only applies to the annotations or it's something "general" that can also be configured in the yaml or xml definition. Having this documented (and in the case it's only a thing of the annotations, having that also in the yaml or xml) can be useful when multiple files are loaded from the Questions: a) Does this only apply to the annotations or the routes themselves? Thnx! |
This PR allows defining the priority of routes using annotations:
@Route(name="foo", priority=10)
As requested in this comment, priority is reserved to using annotations. For other formats, the order works fine.