Skip to content

Commit 073cc12

Browse files
committed
minor #15174 [Routing] Rewording Priority Parameter (ThomasLandauer)
This PR was merged into the 5.2 branch. Discussion ---------- [Routing] Rewording Priority Parameter Important part: Explaining how to do it in YAML and XML, to make clear that `priority` is not *limited* to annotations/attributes - but simply not necessary in YAML/XML :-) Closes #13367 Commits ------- bf9e574 Rewording Priority Parameter
2 parents f5e459e + bf9e574 commit 073cc12

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

routing.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -997,11 +997,10 @@ Priority Parameter
997997

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

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

10061005
.. configuration-block::
10071006

0 commit comments

Comments
 (0)