File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -415,8 +415,7 @@ Reference Tagged Services
415
415
416
416
Symfony provides a shortcut to inject all services tagged with a specific tag,
417
417
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.
420
419
421
420
In the following example, all services tagged with ``app.handler `` are passed as
422
421
first constructor argument to the ``App\HandlerCollection `` service:
@@ -524,3 +523,6 @@ application handlers.
524
523
// app/config/services.php
525
524
$container->register(App\Handler\One::class)
526
525
->addTag('app.handler', array('priority' => 20));
526
+
527
+ Note that any other custom attributes will be ignored by this feature.
528
+
You can’t perform that action at this time.
0 commit comments