Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed deprecated code

  • Loading branch information...
commit 442630133f61feb3640429f7d6802dc1964a9f59 1 parent db3df5a
@dosten dosten authored
Showing with 0 additions and 60 deletions.
  1. +0 −60 Dumper/PhpDumper.php
View
60 Dumper/PhpDumper.php
@@ -25,7 +25,6 @@
use Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\NullDumper;
use Symfony\Component\DependencyInjection\ExpressionLanguage;
use Symfony\Component\ExpressionLanguage\Expression;
-use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface;
/**
* PhpDumper dumps a service container as a PHP class.
@@ -677,65 +676,6 @@ private function addServices()
return $publicServices.$privateServices;
}
- /**
- * Adds synchronizer methods.
- *
- * @param string $id A service identifier
- * @param Definition $definition A Definition instance
- *
- * @return string|null
- *
- * @deprecated since version 2.7, will be removed in 3.0.
- */
- private function addServiceSynchronizer($id, Definition $definition)
- {
- if (!$definition->isSynchronized(false)) {
- return;
- }
-
- if ('request' !== $id) {
- @trigger_error('Synchronized services were deprecated in version 2.7 and won\'t work anymore in 3.0.', E_USER_DEPRECATED);
- }
-
- $code = '';
- foreach ($this->container->getDefinitions() as $definitionId => $definition) {
- foreach ($definition->getMethodCalls() as $call) {
- foreach ($call[1] as $argument) {
- if ($argument instanceof Reference && $id == (string) $argument) {
- $arguments = array();
- foreach ($call[1] as $value) {
- $arguments[] = $this->dumpValue($value);
- }
-
- $call = $this->wrapServiceConditionals($call[1], sprintf("\$this->get('%s')->%s(%s);", $definitionId, $call[0], implode(', ', $arguments)));
-
- $code .= <<<EOF
- if (\$this->initialized('$definitionId')) {
- $call
- }
-
-EOF;
- }
- }
- }
- }
-
- if (!$code) {
- return;
- }
-
- return <<<EOF
-
- /**
- * Updates the '$id' service.
- */
- protected function synchronize{$this->camelize($id)}Service()
- {
-$code }
-
-EOF;
- }
-
private function addNewInstance($id, Definition $definition, $return, $instantiation)
{
$class = $this->dumpValue($definition->getClass());
Please sign in to comment.
Something went wrong with that request. Please try again.