Skip to content

Commit a21981b

Browse files
Add code review fixes
1 parent 59ee885 commit a21981b

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

service_container/tags.rst

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -585,10 +585,15 @@ application handlers::
585585
}
586586
}
587587

588-
Prioritizing Tagged Services
589-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
590588

591-
The tagged services can be prioritized using the ``priority`` attribute:
589+
Tagged Services with Priority
590+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
591+
.. versionadded:: 4.4
592+
593+
The ability to prioritize tagged services was introduced in Symfony 4.4
594+
595+
The tagged services can be prioritized using the ``priority`` attribute, thus providing
596+
a way to inject a sorted collection.
592597

593598
.. configuration-block::
594599

@@ -689,8 +694,7 @@ If you want to have another method defining the priority, you can define it in t
689694
// ...
690695
691696
$services->set(App\HandlerCollection::class)
692-
->args(
693-
[
697+
->args([
694698
new TaggedIteratorArgument('app.handler', null, null, false, 'getPriority'),
695699
]
696700
);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy