Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit148bdec

Browse files
committed
Do not process bindings in AbstractRecursivePass
1 parent4a68775 commit148bdec

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-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: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespaceSymfony\Component\DependencyInjection\Tests\Compiler;
1313

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

92+
publicfunctiontestProcessDefinitionWithBindings()
93+
{
94+
$container =newContainerBuilder();
95+
96+
$container->register('a','stdClass');
97+
98+
$container
99+
->register('b')
100+
->setBindings(array(newBoundArgument(newReference('a'))))
101+
;
102+
103+
$this->process($container);
104+
105+
$this->addToAssertionCount(1);
106+
}
107+
91108
privatefunctionprocess(ContainerBuilder$container)
92109
{
93110
$pass =newCheckExceptionOnInvalidReferenceBehaviorPass();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp