8000 removed obsolete code by fabpot · Pull Request #17928 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

removed obsolete code #17928

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 26, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
removed obsolete code
8000
  • Loading branch information
fabpot committed Feb 26, 2016
commit 6f5322ed8a10af800d6858576015acde1efd80dd
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ private function updateReferences($container, $currentId, $newId)
$this->updateArgumentReferences($definition->getProperties(), $currentId, $newId)
);

$definition->setFactoryService($this->updateFactoryServiceReference($definition->getFactoryService(false), $currentId, $newId), false);
$definition->setFactory($this->updateFactoryReference($definition->getFactory(), $currentId, $newId));
}
}
Expand Down Expand Up @@ -126,15 +125,6 @@ private function updateArgumentReferences(array $arguments, $currentId, $newId)
return $arguments;
}

private function updateFactoryServiceReference($factoryService, $currentId, $newId)
{
if (null === $factoryService) {
return;
}

return $currentId === $factoryService ? $newId : $currentId;
}

private function updateFactoryReference($factory, $currentId, $newId)
{
if (null === $factory || !is_array($factory) || !$factory[0] instanceof Reference) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ public function testProcess()
$container = new ContainerBuilder();

$aDefinition = $container->register('a', '\stdClass');
$aDefinition->setFactoryService('b', false);

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

$bDefinition = new Definition('\stdClass');
Expand All @@ -44,8 +42,6 @@ public function testProcess()
'->process() replaces alias to actual.'
);

$this->assertSame('b_alias', $aDefinition->getFactoryService(false));

$resolvedFactory = $aDefinition->getFactory(false);
$this->assertSame('b_alias', (string) $resolvedFactory[0]);
}
Expand Down
0