Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 68f55ba

Browse files
committed
Apply nicolas-grekas diff
1 parent 239ba21 commit 68f55ba

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/Symfony/Component/DependencyInjection/Compiler/AutowirePass.php

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -276,24 +276,18 @@ private function autowireMethod(\ReflectionFunctionAbstract $reflectionMethod, a
276276
continue;
277277
}
278278

279-
$type = ProxyHelper::exportType($parameter, true);
280-
281279
if ($checkAttributes) {
282280
foreach ($parameter->getAttributes() as $attribute) {
283281
if (\in_array($attribute->getName(), [TaggedIterator::class, TaggedLocator::class, Autowire::class, MapDecorated::class], true)) {
284282
$arguments[$index] = $this->processAttribute($attribute->newInstance(), $parameter->allowsNull());
285283

286-
break;
284+
continue 2;
287285
}
288286
}
289-
290-
if ('' !== ($arguments[$index] ?? '')) {
291-
continue;
292-
}
293287
}
294288

295-
if (!$type) {
296-
if (\array_key_exists($index, $arguments)) {
289+
if (!$type = ProxyHelper::exportType($parameter, true)) {
290+
if (isset($arguments[$index])) {
297291
continue;
298292
}
299293

0 commit comments

Comments
 (0)