8000 Merge branch '3.4' into 4.0 · symfony/symfony@0c8ca6a · GitHub
[go: up one dir, main page]

Skip to content

Commit 0c8ca6a

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 07512bb + 723d26f commit 0c8ca6a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/Symfony/Bridge/PhpUnit/Legacy/CoverageListenerForV7.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,6 @@ public function __construct(callable $sutFqcnResolver = null, $warningOnSutNotFo
3636

3737
public function startTestSuite(TestSuite $suite): void
3838
{
39-
$this->trait->startTest($test);
39+
$this->trait->startTest($suite);
4040
}
4141
}

src/Symfony/Component/DependencyInjection/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)
0