Skip to content

Commit 958aeaf

Browse files
hermann8ujaviereguiluz
authored andcommitted
Add priority order explanation for tagged services
1 parent 15a3220 commit 958aeaf

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

service_container/tags.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -596,8 +596,9 @@ Tagged Services with Priority
596596

597597
The ability to prioritize tagged services was introduced in Symfony 4.4.
598598

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

602603
.. configuration-block::
603604

@@ -655,7 +656,7 @@ service itself::
655656
}
656657
}
657658

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

0 commit comments

Comments
 (0)