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 2828class AutowirePass extends AbstractRecursivePass
2929{
3030 private $ types ;
31- private $ ambiguousServiceTypes = array () ;
31+ private $ ambiguousServiceTypes ;
3232 private $ lastFailure ;
3333 private $ throwOnAutowiringException ;
3434
@@ -46,7 +46,7 @@ public function process(ContainerBuilder $container)
4646 parent ::process ($ container );
4747 } finally {
4848 $ this ->types = null ;
49- $ this ->ambiguousServiceTypes = array () ;
49+ $ this ->ambiguousServiceTypes = null ;
5050 }
5151 }
5252
@@ -238,6 +238,7 @@ private function getAutowiredReference(TypedReference $reference)
238238 private function populateAvailableTypes ()
239239 {
240240 $ this ->types = array ();
241+ $ this ->ambiguousServiceTypes = array ();
241242
242243 foreach ($ this ->container ->getDefinitions () as $ id => $ definition ) {
243244 $ this ->populateAvailableType ($ id , $ definition );
@@ -333,7 +334,7 @@ private function createTypeAlternatives(TypedReference $reference)
333334 if ($ message = $ this ->getAliasesSuggestionForType ($ type = $ reference ->getType ())) {
334335 return ' ' .$ message ;
335336 }
336- if (null === $ this ->types ) {
337+ if (null === $ this ->ambiguousServiceTypes ) {
337338 $ this ->populateAvailableTypes ();
338339 }
339340
You can’t perform that action at this time.
0 commit comments