Skip to content

[Routing] Rewording Priority Parameter #15174

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
merged 1 commit into from
Apr 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -997,11 +997,10 @@ Priority Parameter

The ``priority`` parameter was introduced in Symfony 5.1

When defining a greedy pattern that matches many routes, this may be at the
beginning of your routing collection and prevents any route defined after to be
matched.
A ``priority`` optional parameter is available in order to let you choose the
order of your routes, and it is only available when using annotations.
Symfony evaluates routes in the order they are defined. So a routing pattern
that matches many routes might prevent subsequent routes to be matched. In YAML
and XML you can control the order by moving the routes up or down inside the file.
For annotations and attributes, there is an optional ``priority`` parameter:

.. configuration-block::

Expand Down