@@ -139,8 +139,7 @@ private function doProcessValue($value, bool $isRoot = false)
139
139
array_unshift ($ this ->methodCalls , [$ constructor , $ value ->getArguments ()]);
140
140
}
141
141
142
- $ checkAttributes = 80000 <= \PHP_VERSION_ID && !$ value ->hasTag ('container.ignore_attributes ' );
143
- $ this ->methodCalls = $ this ->autowireCalls ($ reflectionClass , $ isRoot , $ checkAttributes );
142
+ $ this ->methodCalls = $ this ->autowireCalls ($ reflectionClass , $ isRoot );
144
143
145
144
if ($ constructor ) {
146
145
[, $ arguments ] = array_shift ($ this ->methodCalls );
@@ -157,7 +156,7 @@ private function doProcessValue($value, bool $isRoot = false)
157
156
return $ value ;
158
157
}
159
158
160
- private function autowireCalls (\ReflectionClass $ reflectionClass , bool $ isRoot, bool $ checkAttributes ): array
159
+ private function autowireCalls (\ReflectionClass $ reflectionClass , bool $ isRoot ): array
161
160
{
162
161
$ this ->decoratedId = null ;
163
162
$ this ->decoratedClass = null ;
@@ -186,7 +185,7 @@ private function autowireCalls(\ReflectionClass $reflectionClass, bool $isRoot,
186
185
}
187
186
}
188
187
189
- $ arguments = $ this ->autowireMethod ($ reflectionMethod , $ arguments , $ checkAttributes , $ i );
188
+ $ arguments = $ this ->autowireMethod ($ reflectionMethod , $ arguments , $ i );
190
189
191
190
if ($ arguments !== $ call [1 ]) {
192
191
$ this ->methodCalls [$ i ][1 ] = $ arguments ;
@@ -227,7 +226,7 @@ private function autowireCalls(\ReflectionClass $reflectionClass, bool $isRoot,
227
226
*
228
227
* @throws AutowiringFailedException
229
228
*/
230
- private function autowireMethod (\ReflectionFunctionAbstract $ reflectionMethod , array $ arguments , bool $ checkAttributes , int $ methodIndex ): array
229
+ private function autowireMethod (\ReflectionFunctionAbstract $ reflectionMethod , array $ arguments , int $ methodIndex ): array
231
230
{
232
231
$ class = $ reflectionMethod instanceof \ReflectionMethod ? $ reflectionMethod ->class : $ this ->currentId ;
233
232
$ method = $ reflectionMethod ->name ;
@@ -246,26 +245,6 @@ private function autowireMethod(\ReflectionFunctionAbstract $reflectionMethod, a
246
245
247
246
$ type = ProxyHelper::getTypeHint ($ reflectionMethod , $ parameter , true );
248
247
249
- if ($ checkAttributes ) {
250
- foreach ($ parameter ->getAttributes () as $ attribute ) {
251
- if (TaggedIterator::class === $ attribute ->getName ()) {
252
- $ attribute = $ attribute ->newInstance ();
253
- $ arguments [$ index ] = new TaggedIteratorArgument ($ attribute ->tag , $ attribute ->indexAttribute );
254
- break ;
255
- }
256
-
257
- if (TaggedLocator::class === $ attribute ->getName ()) {
258
- $ attribute = $ attribute ->newInstance ();
259
- $ arguments [$ index ] = new ServiceLocatorArgument (new TaggedIteratorArgument ($ attribute ->tag , $ attribute ->indexAttribute , null , true ));
260
- break ;
261
- }
262
- }
263
-
264
- if ('' !== ($ arguments [$ index ] ?? '' )) {
265
- continue ;
266
- }
267
- }
268
-
269
248
if (!$ type ) {
270
249
if (isset ($ arguments [$ index ])) {
271
250
continue ;
0 commit comments