|
25 | 25 | use Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\NullDumper;
|
26 | 26 | use Symfony\Component\DependencyInjection\ExpressionLanguage;
|
27 | 27 | use Symfony\Component\ExpressionLanguage\Expression;
|
28 |
| -use Symfony\Component\ExpressionLanguage\ExpressionFunctionProviderInterface; |
29 | 28 |
|
30 | 29 | /**
|
31 | 30 | * PhpDumper dumps a service container as a PHP class.
|
@@ -677,65 +676,6 @@ private function addServices()
|
677 | 676 | return $publicServices.$privateServices;
|
678 | 677 | }
|
679 | 678 |
|
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 |
| - |
739 | 679 | private function addNewInstance($id, Definition $definition, $return, $instantiation)
|
740 | 680 | {
|
741 | 681 | $class = $this->dumpValue($definition->getClass());
|
|
0 commit comments