Skip to content

Commit 8ba653f

Browse files
committed
[DependencyInjection] fix merge
Remove code from bugfix that deals with features removed in Symfony 3.0.
1 parent c1f2c70 commit 8ba653f

File tree

2 files changed

+1
-32
lines changed

2 files changed

+1
-32
lines changed

Compiler/ResolveReferencesToAliasesPass.php

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,6 @@ public function process(ContainerBuilder $container)
4444
$definition->setMethodCalls($this->processArguments($definition->getMethodCalls()));
4545
$definition->setProperties($this->processArguments($definition->getProperties()));
4646
$definition->setFactory($this->processFactory($definition->getFactory()));
47-
48-
if (null !== $factoryService = $definition->getFactoryService(false)) {
49-
$definition->setFactoryService($this->processFactoryService($factoryService));
50-
}
5147
}
5248

5349
foreach ($container->getAliases() as $id => $alias) {
@@ -82,15 +78,6 @@ private function processArguments(array $arguments)
8278
return $arguments;
8379
}
8480

85-
private function processFactoryService($factoryService)
86-
{
87-
if (null === $factoryService) {
88-
return;
89-
}
90-
91-
return $this->getDefinitionId($factoryService);
92-
}
93-
9481
private function processFactory($factory)
9582
{
9683
if (null === $factory || !is_array($factory) || !$factory[0] instanceof Reference) {
@@ -100,7 +87,7 @@ private function processFactory($factory)
10087
$defId = $this->getDefinitionId($id = (string) $factory[0]);
10188

10289
if ($defId !== $id) {
103-
$factory[0] = new Reference($defId, $factory[0]->getInvalidBehavior(), $factory[0]->isStrict(false));
90+
$factory[0] = new Reference($defId, $factory[0]->getInvalidBehavior());
10491
}
10592

10693
return $factory;

Tests/Compiler/ResolveReferencesToAliasesPassTest.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -82,24 +82,6 @@ public function testResolveFactory()
8282
$this->assertSame('Factory', (string) $resolvedBarFactory[0]);
8383
}
8484

85-
/**
86-
* @group legacy
87-
*/
88-
public function testResolveFactoryService()
89-
{
90-
$container = new ContainerBuilder();
91-
$container->register('factory', 'Factory');
92-
$container->setAlias('factory_alias', new Alias('factory'));
93-
$foo = new Definition();
94-
$foo->setFactoryService('factory_alias');
95-
$foo->setFactoryMethod('createFoo');
96-
$container->setDefinition('foo', $foo);
97-
98-
$this->process($container);
99-
100-
$this->assertSame('factory', $foo->getFactoryService());
101-
}
102-
10385
protected function process(ContainerBuilder $container)
10486
{
10587
$pass = new ResolveReferencesToAliasesPass();

0 commit comments

Comments
 (0)