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

Appearance settings

Commit 9da5da3

Browse filesBrowse files
committed
set synthetic flag from $definition, not $parentDef
1 parent 75bb8f8 commit 9da5da3
Copy full SHA for 9da5da3

File tree

2 files changed

+4
-5
lines changed
Filter options

2 files changed

+4
-5
lines changed

‎src/Symfony/Component/DependencyInjection/Compiler/ResolveChildDefinitionsPass.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Compiler/ResolveChildDefinitionsPass.php
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,11 @@ private function doResolveDefinition(ChildDefinition $definition): Definition
111111
$def->setLazy($parentDef->isLazy());
112112
$def->setAutowired($parentDef->isAutowired());
113113
$def->setChanges($parentDef->getChanges());
114-
$def->setSynthetic($parentDef->isSynthetic());
115114

116115
$def->setBindings($definition->getBindings() + $parentDef->getBindings());
117116

117+
$def->setSynthetic($definition->isSynthetic());
118+
118119
// overwrite with values specified in the decorator
119120
$changes = $definition->getChanges();
120121
if (isset($changes['class'])) {

‎src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveChildDefinitionsPassTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Tests/Compiler/ResolveChildDefinitionsPassTest.php
+2-4Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -417,13 +417,11 @@ public function testProcessCopiesSyntheticStatus()
417417
{
418418
$container = new ContainerBuilder();
419419

420-
$container
421-
->register('parent')
422-
->setSynthetic(true)
423-
;
420+
$container->register('parent');
424421

425422
$container
426423
->setDefinition('child', new ChildDefinition('parent'))
424+
->setSynthetic(true)
427425
;
428426

429427
$this->process($container);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.