Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 2e5c87f

Browse filesBrowse files
authored
Update tags.rst
1 parent 564b5ea commit 2e5c87f
Copy full SHA for 2e5c87f

File tree

Expand file treeCollapse file tree

1 file changed

+4
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-2
lines changed

‎service_container/tags.rst

Copy file name to clipboardExpand all lines: service_container/tags.rst
+4-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.