|
14 | 14 | use Doctrine\Common\Annotations\AnnotationRegistry;
|
15 | 15 | use Doctrine\Common\Annotations\Reader;
|
16 | 16 | use Psr\Cache\CacheItemPoolInterface;
|
| 17 | +use Psr\Container\ContainerInterface as PsrContainerInterface; |
17 | 18 | use Psr\Log\LoggerAwareInterface;
|
18 | 19 | use Symfony\Bridge\Monolog\Processor\DebugProcessor;
|
19 | 20 | use Symfony\Bridge\Monolog\Processor\ProcessorInterface;
|
|
46 | 47 | use Symfony\Component\DependencyInjection\Exception\LogicException;
|
47 | 48 | use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
|
48 | 49 | use Symfony\Component\DependencyInjection\Parameter;
|
49 |
| -use Symfony\Component\DependencyInjection\ParameterBag\ContainerBagInterface; |
50 |
| -use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; |
51 | 50 | use Symfony\Component\DependencyInjection\Reference;
|
52 | 51 | use Symfony\Component\DependencyInjection\ServiceLocator;
|
53 | 52 | use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
@@ -133,11 +132,7 @@ public function load(array $configs, ContainerBuilder $container)
|
133 | 132 | $loader->load('services.xml');
|
134 | 133 | $loader->load('fragment_renderer.xml');
|
135 | 134 |
|
136 |
| - if (!interface_exists(ContainerBagInterface::class)) { |
137 |
| - $container->removeDefinition('parameter_bag'); |
138 |
| - $container->removeAlias(ContainerBagInterface::class); |
139 |
| - $container->removeAlias(ParameterBagInterface::class); |
140 |
| - } |
| 135 | + $container->registerAliasForArgument('parameter_bag', PsrContainerInterface::class); |
141 | 136 |
|
142 | 137 | if (class_exists(Application::class)) {
|
143 | 138 | $loader->load('console.xml');
|
@@ -715,12 +710,6 @@ private function registerRouterConfiguration(array $config, ContainerBuilder $co
|
715 | 710 | if ($config['utf8']) {
|
716 | 711 | $container->getDefinition('routing.loader')->replaceArgument(2, array('utf8' => true));
|
717 | 712 | }
|
718 |
| - if (!interface_exists(ContainerBagInterface::class)) { |
719 |
| - $container->getDefinition('router.default') |
720 |
| - ->replaceArgument(0, new Reference('service_container')) |
721 |
| - ->clearTag('container.service_subscriber') |
722 |
| - ; |
723 |
| - } |
724 | 713 |
|
725 | 714 | $container->setParameter('router.resource', $config['resource']);
|
726 | 715 | $container->setParameter('router.cache_class_prefix', $container->getParameter('kernel.container_class'));
|
|
0 commit comments