File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 28
28
class AutowirePass extends AbstractRecursivePass
29
29
{
30
30
private $ types ;
31
- private $ ambiguousServiceTypes = array () ;
31
+ private $ ambiguousServiceTypes ;
32
32
private $ lastFailure ;
33
33
private $ throwOnAutowiringException ;
34
34
@@ -46,7 +46,7 @@ public function process(ContainerBuilder $container)
46
46
parent ::process ($ container );
47
47
} finally {
48
48
$ this ->types = null ;
49
- $ this ->ambiguousServiceTypes = array () ;
49
+ $ this ->ambiguousServiceTypes = null ;
50
50
}
51
51
}
52
52
@@ -238,6 +238,7 @@ private function getAutowiredReference(TypedReference $reference)
238
238
private function populateAvailableTypes ()
239
239
{
240
240
$ this ->types = array ();
241
+ $ this ->ambiguousServiceTypes = array ();
241
242
242
243
foreach ($ this ->container ->getDefinitions () as $ id => $ definition ) {
243
244
$ this ->populateAvailableType ($ id , $ definition );
@@ -333,7 +334,7 @@ private function createTypeAlternatives(TypedReference $reference)
333
334
if ($ message = $ this ->getAliasesSuggestionForType ($ type = $ reference ->getType ())) {
334
335
return ' ' .$ message ;
335
336
}
336
- if (null === $ this ->types ) {
337
+ if (null === $ this ->ambiguousServiceTypes ) {
337
338
$ this ->populateAvailableTypes ();
338
339
}
339
340
You can’t perform that action at this time.
0 commit comments