We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9b65586 commit 1272701Copy full SHA for 1272701
service_container/tags.rst
@@ -1281,4 +1281,19 @@ be used directly on the class of the service you want to configure::
1281
// ...
1282
}
1283
1284
+You can apply the ``#[AsTaggedItem]`` attribute multiple times to register the
1285
+same service under different indexes:
1286
+
1287
+ #[AsTaggedItem(index: 'handler_one', priority: 5)]
1288
+ #[AsTaggedItem(index: 'handler_two', priority: 20)]
1289
+ class SomeService
1290
+ {
1291
+ // ...
1292
+ }
1293
1294
+.. versionadded:: 7.3
1295
1296
+ The feature to apply the ``#[AsTaggedItem]`` attribute multiple times was
1297
+ introduced in Symfony 7.3.
1298
1299
.. _`PHP constructor promotion`: https://www.php.net/manual/en/language.oop5.decon.php#language.oop5.decon.constructor.promotion
0 commit comments