Skip to content

Commit 85aed22

Browse files
committed
Merge branch '5.1' into 5.x
* 5.1: Add priority order explanation for tagged services Update routing.rst
2 parents c2d21d5 + b708b67 commit 85aed22

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

routing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1562,7 +1562,7 @@ when importing the routes.
15621562
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
15631563
15641564
return function (RoutingConfigurator $routes) {
1565-
// use the optional fifth argument of import() to exclude some files
1565+
// use the optional fourth argument of import() to exclude some files
15661566
// or subdirectories when loading annotations
15671567
$routes->import('../../src/Controller/', 'annotation')
15681568
// this is added to the beginning of all imported route URLs

service_container/tags.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -594,8 +594,9 @@ application handlers::
594594
Tagged Services with Priority
595595
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
596596

597-
The tagged services can be prioritized using the ``priority`` attribute,
598-
thus providing a way to inject a sorted collection of services:
597+
The tagged services can be prioritized using the ``priority`` attribute.
598+
The priority is a positive or negative integer. The higher the number,
599+
the earlier the tagged service will be located in the collection:
599600

600601
.. configuration-block::
601602

@@ -653,7 +654,7 @@ service itself::
653654
}
654655
}
655656

656-
If you want to have another method defining the priority
657+
If you want to have another method defining the priority
657658
(e.g. ``getPriority()`` rather than ``getDefaultPriority()``),
658659
you can define it in the configuration of the collecting service:
659660

0 commit comments

Comments
 (0)