8000 minor #15184 [DependencyInjection] Remove deprecated code (dosten) · symfony/symfony@5d4368a · GitHub
[go: up one dir, main page]

Skip to content

Commit 5d4368a

Browse files
committed
minor #15184 [DependencyInjection] Remove deprecated code (dosten)
This PR was merged into the 3.0-dev branch. Discussion ---------- [DependencyInjection] Remove deprecated code | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | License | MIT This code has been removed in #14155 but seems that a wrong merge didn't removed it. Commits ------- f2fef91 Removed deprecated code
2 parents 8279d11 + f2fef91 commit 5d4368a

File tree

1 file changed

+0
-60
lines changed

1 file changed

+0
-60
lines changed

src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php

Lines changed: 0 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
use Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\NullDumper;
2626
use Symfony\Component\DependencyInjection\ExpressionLanguage;
2727
use Symfony\Component\ExpressionLanguage\Expression;
28-
use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface;
2928

3029
/**
3130
* PhpDumper dumps a service container as a PHP class.
@@ -677,65 +676,6 @@ private function addServices()
677676
return $publicServices.$privateServices;
678677
}
679678

680-
/**
681-
* Adds synchronizer methods.
682-
*
683-
* @param string $id A service identifier
684-
* @param Definition $definition A Definition instance
685-
*
686-
* @return string|null
687-
*
688-
* @deprecated since version 2.7, will be removed in 3.0.
689-
*/
690-
private function addServiceSynchronizer($id, Definition $definition)
691-
{
692-
if (!$definition->isSynchronized(false)) {
693-
return;
694-
}
695-
696-
if ('request' !== $id) {
697-
@trigger_error('Synchronized services were deprecated in version 2.7 and won\'t work anymore in 3.0.', E_USER_DEPRECATED);
698-
}
699-
700-
$code = '';
701-
foreach ($this->container->getDefinitions() as $definitionId => $definition) {
702-
foreach ($definition->getMethodCalls() as $call) {
703-
foreach ($call[1] as $argument) {
704-
if ($argument instanceof Reference && $id == (string) $argument) {
705-
$arguments = array();
706-
foreach ($call[1] as $value) {
707-
$arguments[] = $this->dumpValue($value);
708-
}
709-
710-
$call = $this->wrapServiceConditionals($call[1], sprintf("\$this->get('%s')->%s(%s);", $definitionId, $call[0], implode(', ', $arguments)));
711-
712-
$code .= <<<EOF
713-
if (\$this->initialized('$definitionId')) {
714-
$call
715-
}
716-
717-
EOF;
718-
}
719-
}
720-
}
721-
}
722-
723-
if (!$code) {
724-
return;
725-
}
726-
727-
return <<<EOF
728-
729-
/**
730-
* Updates the '$id' service.
731-
*/
732-
protected function synchronize{$this->camelize($id)}Service()
733-
{
734-
$code }
735-
736-
EOF;
737-
}
738-
739679
private function addNewInstance($id, Definition $definition, $return, $instantiation)
740680
{
741681
$class = $this->dumpValue($definition->getClass());

0 commit comments

Comments
 (0)
0