8000 Add code review fixes · symfony/symfony-docs@b2fd0f1 · GitHub
[go: up one dir, main page]

Skip to content

Commit b2fd0f1

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

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

service_container/tags.rst

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

588-
Prioritizing Tagged Services
588+
589+
590+
Tagged Services with Priority
589591
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
592+
.. versionadded:: 4.4
593+
594+
The ability to prioritize tagged services was introduced in Symfony 4.4
590595

591-
The tagged services can be prioritized using the ``priority`` attribute:
596+
The tagged services can be prioritized using the ``priority`` attribute, thus providing
597+
a way to inject a sorted collection.
592598

593599
.. configuration-block::
594600

@@ -689,8 +695,7 @@ If you want to have another method defining the priority, you can define it in t
689695
// ...
690696
691697
$services->set(App\HandlerCollection::class)
692-
->args(
693-
[
698+
->args([
694699
new TaggedIteratorArgument('app.handler', null, null, false, 'getPriority'),
695700
]
696701
);

0 commit comments

Comments
 (0)
0