Skip to content

Commit 4d24d93

Browse files
authored
Add priority order explanation for tagged services
Hi, In this page, the priority order is not explained for tagged services. Since I needed to know this, I guess it is a good addition. The text is mostly inspired from the paragraph about priority in the event dispatcher documentation : https://symfony.com/doc/current/event_dispatcher.html#creating-an-event-listener Fell free to edit it or to provide me some advice to do it. Regards
1 parent b8fa740 commit 4d24d93

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

service_container/tags.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -595,6 +595,9 @@ Tagged Services with Priority
595595
The tagged services can be prioritized using the ``priority`` attribute,
596596
thus providing a way to inject a sorted collection of services:
597597

598+
.. tip::
599+
The priority is a positive or negative integer. The higher the number, the earlier the tagged service will be located in the collection.
600+
598601
.. configuration-block::
599602

600603
.. code-block:: yaml

0 commit comments

Comments
 (0)