Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2e5c87f

Browse files
authored
Update tags.rst
1 parent 564b5ea commit 2e5c87f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

service_container/tags.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,8 +415,7 @@ Reference Tagged Services
415415

416416
Symfony provides a shortcut to inject all services tagged with a specific tag,
417417
which is a common need in some applications, so you don't have to write a
418-
compiler pass just for that. The only downside of this feature is that you can't
419-
have any custom attributes.
418+
compiler pass just for that.
420419

421420
In the following example, all services tagged with ``app.handler`` are passed as
422421
first constructor argument to the ``App\HandlerCollection`` service:
@@ -524,3 +523,6 @@ application handlers.
524523
// app/config/services.php
525524
$container->register(App\Handler\One::class)
526525
->addTag('app.handler', array('priority' => 20));
526+
527+
Note that any other custom attributes will be ignored by this feature.
528+

0 commit comments

Comments
 (0)