File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -1281,4 +1281,24 @@ be used directly on the class of the service you want to configure::
1281
1281
// ...
1282
1282
}
1283
1283
1284
+ The attribute can be repeated on the same class to define multiple tags
1285
+ with different indexes and priorities::
1286
+
1287
+ // src/Handler/One.php
1288
+ namespace App\Handler;
1289
+
1290
+ use Symfony\Component\DependencyInjection\Attribute\AsTaggedItem;
1291
+
1292
+ #[AsTaggedItem(index: 'handler_one', priority: 10)]
1293
+ #[AsTaggedItem(index: 'handler_two', priority: 20)]
1294
+ class One
1295
+ {
1296
+ // ...
1297
+ }
1298
+
1299
+ .. versionadded :: 7.3
1300
+
1301
+ The support for repeated ``#[AsTaggedItem] `` attributes was introduced in
1302
+ Symfony 7.3.
1303
+
1284
1304
.. _`PHP constructor promotion` : https://www.php.net/manual/en/language.oop5.decon.php#language.oop5.decon.constructor.promotion
You can’t perform that action at this time.
0 commit comments