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 40e5f78

Browse filesBrowse files
committed
minor #17909 [DependencyInjection] fix tests (xabbuh)
This PR was merged into the 2.7 branch. Discussion ---------- [DependencyInjection] fix tests | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Commits ------- 0de2107 [DependencyInjection] fix tests
2 parents 6190058 + 0de2107 commit 40e5f78
Copy full SHA for 40e5f78

File tree

Expand file treeCollapse file tree

2 files changed

+4
-5
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-5
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Compiler/ReplaceAliasByActualDefinitionPass.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ private function updateReferences($container, $currentId, $newId)
9696
$this->updateArgumentReferences($definition->getProperties(), $currentId, $newId)
9797
);
9898

99-
$definition->setFactoryService($this->updateFactoryServiceReference($definition->getFactoryService(), $currentId, $newId));
99+
$definition->setFactoryService($this->updateFactoryServiceReference($definition->getFactoryService(false), $currentId, $newId), false);
100100
$definition->setFactory($this->updateFactoryReference($definition->getFactory(), $currentId, $newId));
101101
}
102102
}

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

Copy file name to clipboardExpand all lines: src/Symfony/Component/DependencyInjection/Tests/Compiler/ReplaceAliasByActualDefinitionPassTest.php
+3-4Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ public function testProcess()
2323
$container = new ContainerBuilder();
2424

2525
$aDefinition = $container->register('a', '\stdClass');
26-
$aDefinition->setFactoryService('b');
27-
$aDefinition->setFactoryMethod('createA');
26+
$aDefinition->setFactoryService('b', false);
2827

2928
$aDefinition->setFactory(array(new Reference('b'), 'createA'));
3029

@@ -45,9 +44,9 @@ public function testProcess()
4544
'->process() replaces alias to actual.'
4645
);
4746

48-
$this->assertSame('b_alias', $aDefinition->getFactoryService());
47+
$this->assertSame('b_alias', $aDefinition->getFactoryService(false));
4948

50-
$resolvedFactory = $aDefinition->getFactory();
49+
$resolvedFactory = $aDefinition->getFactory(false);
5150
$this->assertSame('b_alias', (string) $resolvedFactory[0]);
5251
}
5352

0 commit comments

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