@@ -674,13 +674,13 @@ directly via PHP attributes:
674
674
// src/HandlerCollection.php
675
675
namespace App;
676
676
677
- use Symfony\Component\DependencyInjection\Attribute\TaggedIterator ;
677
+ use Symfony\Component\DependencyInjection\Attribute\AutowireIterator ;
678
678
679
679
class HandlerCollection
680
680
{
681
681
public function __construct(
682
682
// the attribute must be applied directly to the argument to autowire
683
- #[TaggedIterator ('app.handler')]
683
+ #[AutowireIterator ('app.handler')]
684
684
iterable $handlers
685
685
) {
686
686
}
@@ -766,12 +766,12 @@ iterator, add the ``exclude`` option:
766
766
// src/HandlerCollection.php
767
767
namespace App;
768
768
769
- use Symfony\Component\DependencyInjection\Attribute\TaggedIterator ;
769
+ use Symfony\Component\DependencyInjection\Attribute\AutowireIterator ;
770
770
771
771
class HandlerCollection
772
772
{
773
773
public function __construct(
774
- #[TaggedIterator ('app.handler', exclude: ['App\Handler\Three'])]
774
+ #[AutowireIterator ('app.handler', exclude: ['App\Handler\Three'])]
775
775
iterable $handlers
776
776
) {
777
777
}
@@ -849,12 +849,12 @@ disabled by setting the ``exclude_self`` option to ``false``:
849
849
// src/HandlerCollection.php
850
850
namespace App;
851
851
852
- use Symfony\Component\DependencyInjection\Attribute\TaggedIterator ;
852
+ use Symfony\Component\DependencyInjection\Attribute\AutowireIterator ;
853
853
854
854
class HandlerCollection
855
855
{
856
856
public function __construct(
857
- #[TaggedIterator ('app.handler', exclude: ['App\Handler\Three'], excludeSelf: false)]
857
+ #[AutowireIterator ('app.handler', exclude: ['App\Handler\Three'], excludeSelf: false)]
858
858
iterable $handlers
859
859
) {
860
860
}
@@ -999,12 +999,12 @@ you can define it in the configuration of the collecting service:
999
999
// src/HandlerCollection.php
1000
1000
namespace App;
1001
1001
1002
- use Symfony\Component\DependencyInjection\Attribute\TaggedIterator ;
1002
+ use Symfony\Component\DependencyInjection\Attribute\AutowireIterator ;
1003
1003
1004
1004
class HandlerCollection
1005
1005
{
1006
1006
public function __construct(
1007
- #[TaggedIterator ('app.handler', defaultPriorityMethod: 'getPriority')]
1007
+ #[AutowireIterator ('app.handler', defaultPriorityMethod: 'getPriority')]
1008
1008
iterable $handlers
1009
1009
) {
1010
1010
}
@@ -1073,12 +1073,12 @@ to index the services:
1073
1073
// src/HandlerCollection.php
1074
1074
namespace App;
1075
1075
1076
- use Symfony\Component\DependencyInjection\Attribute\TaggedIterator ;
1076
+ use Symfony\Component\DependencyInjection\Attribute\AutowireIterator ;
1077
1077
1078
1078
class HandlerCollection
1079
1079
{
1080
1080
public function __construct(
1081
- #[TaggedIterator ('app.handler', indexAttribute: 'key')]
1081
+ #[AutowireIterator ('app.handler', indexAttribute: 'key')]
1082
1082
iterable $handlers
1083
1083
) {
1084
1084
}
@@ -1187,12 +1187,12 @@ get the value used to index the services:
1187
1187
// src/HandlerCollection.php
1188
1188
namespace App;
1189
1189
1190
- use Symfony\Component\DependencyInjection\Attribute\TaggedIterator ;
1190
+ use Symfony\Component\DependencyInjection\Attribute\AutowireIterator ;
1191
1191
1192
1192
class HandlerCollection
1193
1193
{
1194
1194
public function __construct(
1195
- #[TaggedIterator ('app.handler', defaultIndexMethod: 'getIndex')]
1195
+ #[AutowireIterator ('app.handler', defaultIndexMethod: 'getIndex')]
1196
1196
iterable $handlers
1197
1197
) {
1198
1198
}
0 commit comments