8000 bug #24602 [DI] Do not process bindings in AbstractRecursivePass (cha… · symfony/symfony@79caee2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 79caee2

Browse files
committed
bug #24602 [DI] Do not process bindings in AbstractRecursivePass (chalasr)
This PR was merged into the 3.4 branch. Discussion ---------- [DI] Do not process bindings in AbstractRecursivePass | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #24559 | License | MIT | Doc PR | n/a Commits ------- 6a6256c Do not process bindings in AbstractRecursivePass
2 parents 1a8459a + 6a6256c commit 79caee2

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

src/Symfony/Component/DependencyInjection/Compiler/AbstractRecursivePass.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ protected function processValue($value, $isRoot = false)
6767
$value->setArguments($this->processValue($value->getArguments()));
6868
$value->setProperties($this->processValue($value->getProperties()));
6969
$value->setMethodCalls($this->processValue($value->getMethodCalls()));
70-
$value->setBindings($this->processValue($value->getBindings()));
7170

7271
$changes = $value->getChanges();
7372
if (isset($changes['factory'])) {

src/Symfony/Component/DependencyInjection/Tests/Compiler/CheckExceptionOnInvalidReferenceBehaviorPassTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Component\DependencyInjection\Tests\Compiler;
1313

1414
use PHPUnit\Framework\TestCase;
15+
use Symfony\Component\DependencyInjection\Argument\BoundArgument;
1516
use Symfony\Component\DependencyInjection\Definition;
1617
use Symfony\Component\DependencyInjection\Compiler\CheckExceptionOnInvalidReferenceBehaviorPass;
1718
use Symfony\Component\DependencyInjection\Reference;
@@ -88,6 +89,20 @@ public function testProcessThrowsExceptionOnNonSharedUninitializedReference()
8889
$this->process($container);
8990
}
9091

92+
public function testProcessDefinitionWithBindings()
93+
{
94+
$container = new ContainerBuilder();
95+
96+
$container
97+
->register('b')
98+
->setBindings(array(new BoundArgument(new Reference('a'))))
99+
;
100+
101+
$this->process($container);
102+
103+
$this->addToAssertionCount(1);
104+
}
105+
91106
private function process(ContainerBuilder $container)
92107
{
93108
$pass = new CheckExceptionOnInvalidReferenceBehaviorPass();

0 commit comments

Comments
 (0)
0