Skip to content

Commit 2dd7973

Browse files
Merge branch '3.4' into 4.0
* 3.4: [DI] Dont tell about autoregistration in strict autowiring mode [PHPunit] suite variable should be used
2 parents 459ee7c + 1d41629 commit 2dd7973

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Compiler/AutowirePass.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
class 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

0 commit comments

Comments
 (0)