Skip to content

Commit 6a6256c

Browse files
committed
Do not process bindings in AbstractRecursivePass
1 parent 4a68775 commit 6a6256c

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)