Merge branch '3.4' into 4.0
* 3.4: [DI] Dont tell about autoregistration in strict autowiring mode [PHPunit] suite variable should be used
This commit is contained in:
commit
0c8ca6acdb
@ -36,6 +36,6 @@ class CoverageListenerForV7 implements TestListener
|
|||||||
|
|
||||||
public function startTestSuite(TestSuite $suite): void
|
public function startTestSuite(TestSuite $suite): void
|
||||||
{
|
{
|
||||||
$this->trait->startTest($test);
|
$this->trait->startTest($suite);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ use Symfony\Component\DependencyInjection\TypedReference;
|
|||||||
class AutowirePass extends AbstractRecursivePass
|
class AutowirePass extends AbstractRecursivePass
|
||||||
{
|
{
|
||||||
private $types;
|
private $types;
|
||||||
private $ambiguousServiceTypes = array();
|
private $ambiguousServiceTypes;
|
||||||
private $lastFailure;
|
private $lastFailure;
|
||||||
private $throwOnAutowiringException;
|
private $throwOnAutowiringException;
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ class AutowirePass extends AbstractRecursivePass
|
|||||||
parent::process($container);
|
parent::process($container);
|
||||||
} finally {
|
} finally {
|
||||||
$this->types = null;
|
$this->types = null;
|
||||||
$this->ambiguousServiceTypes = array();
|
$this->ambiguousServiceTypes = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -238,6 +238,7 @@ class AutowirePass extends AbstractRecursivePass
|
|||||||
private function populateAvailableTypes()
|
private function populateAvailableTypes()
|
||||||
{
|
{
|
||||||
$this->types = array();
|
$this->types = array();
|
||||||
|
$this->ambiguousServiceTypes = array();
|
||||||
|
|
||||||
foreach ($this->container->getDefinitions() as $id => $definition) {
|
foreach ($this->container->getDefinitions() as $id => $definition) {
|
||||||
$this->populateAvailableType($id, $definition);
|
$this->populateAvailableType($id, $definition);
|
||||||
@ -333,7 +334,7 @@ class AutowirePass extends AbstractRecursivePass
|
|||||||
if ($message = $this->getAliasesSuggestionForType($type = $reference->getType())) {
|
if ($message = $this->getAliasesSuggestionForType($type = $reference->getType())) {
|
||||||
return ' '.$message;
|
return ' '.$message;
|
||||||
}
|
}
|
||||||
if (null === $this->types) {
|
if (null === $this->ambiguousServiceTypes) {
|
||||||
$this->populateAvailableTypes();
|
$this->populateAvailableTypes();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user