@@ -674,13 +674,13 @@ directly via PHP attributes:
674674 // src/HandlerCollection.php
675675 namespace App;
676676
677- use Symfony\Component\DependencyInjection\Attribute\TaggedIterator ;
677+ use Symfony\Component\DependencyInjection\Attribute\AutowireIterator ;
678678
679679 class HandlerCollection
680680 {
681681 public function __construct(
682682 // the attribute must be applied directly to the argument to autowire
683- #[TaggedIterator ('app.handler')]
683+ #[AutowireIterator ('app.handler')]
684684 iterable $handlers
685685 ) {
686686 }
@@ -766,12 +766,12 @@ iterator, add the ``exclude`` option:
766766 // src/HandlerCollection.php
767767 namespace App;
768768
769- use Symfony\Component\DependencyInjection\Attribute\TaggedIterator ;
769+ use Symfony\Component\DependencyInjection\Attribute\AutowireIterator ;
770770
771771 class HandlerCollection
772772 {
773773 public function __construct(
774- #[TaggedIterator ('app.handler', exclude: ['App\Handler\Three'])]
774+ #[AutowireIterator ('app.handler', exclude: ['App\Handler\Three'])]
775775 iterable $handlers
776776 ) {
777777 }
@@ -849,12 +849,12 @@ disabled by setting the ``exclude_self`` option to ``false``:
849849 // src/HandlerCollection.php
850850 namespace App;
851851
852- use Symfony\Component\DependencyInjection\Attribute\TaggedIterator ;
852+ use Symfony\Component\DependencyInjection\Attribute\AutowireIterator ;
853853
854854 class HandlerCollection
855855 {
856856 public function __construct(
857- #[TaggedIterator ('app.handler', exclude: ['App\Handler\Three'], excludeSelf: false)]
857+ #[AutowireIterator ('app.handler', exclude: ['App\Handler\Three'], excludeSelf: false)]
858858 iterable $handlers
859859 ) {
860860 }
@@ -999,12 +999,12 @@ you can define it in the configuration of the collecting service:
999999 // src/HandlerCollection.php
10001000 namespace App;
10011001
1002- use Symfony\Component\DependencyInjection\Attribute\TaggedIterator ;
1002+ use Symfony\Component\DependencyInjection\Attribute\AutowireIterator ;
10031003
10041004 class HandlerCollection
10051005 {
10061006 public function __construct(
1007- #[TaggedIterator ('app.handler', defaultPriorityMethod: 'getPriority')]
1007+ #[AutowireIterator ('app.handler', defaultPriorityMethod: 'getPriority')]
10081008 iterable $handlers
10091009 ) {
10101010 }
@@ -1073,12 +1073,12 @@ to index the services:
10731073 // src/HandlerCollection.php
10741074 namespace App;
10751075
1076- use Symfony\Component\DependencyInjection\Attribute\TaggedIterator ;
1076+ use Symfony\Component\DependencyInjection\Attribute\AutowireIterator ;
10771077
10781078 class HandlerCollection
10791079 {
10801080 public function __construct(
1081- #[TaggedIterator ('app.handler', indexAttribute: 'key')]
1081+ #[AutowireIterator ('app.handler', indexAttribute: 'key')]
10821082 iterable $handlers
10831083 ) {
10841084 }
@@ -1187,12 +1187,12 @@ get the value used to index the services:
11871187 // src/HandlerCollection.php
11881188 namespace App;
11891189
1190- use Symfony\Component\DependencyInjection\Attribute\TaggedIterator ;
1190+ use Symfony\Component\DependencyInjection\Attribute\AutowireIterator ;
11911191
11921192 class HandlerCollection
11931193 {
11941194 public function __construct(
1195- #[TaggedIterator ('app.handler', defaultIndexMethod: 'getIndex')]
1195+ #[AutowireIterator ('app.handler', defaultIndexMethod: 'getIndex')]
11961196 iterable $handlers
11971197 ) {
11981198 }
0 commit comments