From ab1d9b0062c50d232d766f50833e2179f3c93244 Mon Sep 17 00:00:00 2001 From: Jannik Zschiesche Date: Wed, 28 Feb 2018 11:22:01 +0100 Subject: [PATCH 1/2] Autoconfigure service locator tag --- .../FrameworkBundle/DependencyInjection/FrameworkExtension.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index e2c31d5b15b81..8fbc4c276100b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -42,6 +42,7 @@ use Symfony\Component\DependencyInjection\ParameterBag\ContainerBagInterface; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; use Symfony\Component\DependencyInjection\Reference; +use Symfony\Component\DependencyInjection\ServiceLocator; use Symfony\Component\DependencyInjection\ServiceSubscriberInterface; use Symfony\Component\EventDispatcher\EventSubscriberInterface; use Symfony\Component\ExpressionLanguage\ExpressionLanguage; @@ -288,6 +289,8 @@ public function load(array $configs, ContainerBuilder $container) ->addTag('config_cache.resource_checker'); $container->registerForAutoconfiguration(EnvVarProcessorInterface::class) ->addTag('container.env_var_processor'); + $container->registerForAutoconfiguration(ServiceLocator::class) + ->addTag('container.service_locator'); $container->registerForAutoconfiguration(ServiceSubscriberInterface::class) ->addTag('container.service_subscriber'); $container->registerForAutoconfiguration(ArgumentValueResolverInterface::class) From c304f3f094b5f7f9cb87e4467c5d5270b26ca7e6 Mon Sep 17 00:00:00 2001 From: Jannik Zschiesche Date: Wed, 28 Feb 2018 11:25:48 +0100 Subject: [PATCH 2/2] Document autoconfigured service locators --- src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md b/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md index 94bf1ca055d0e..71beae1e84047 100644 --- a/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md +++ b/src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md @@ -16,6 +16,7 @@ CHANGELOG * Deprecated `bundle:controller:action` syntax to reference controllers. Use `serviceOrFqcn::method` instead where `serviceOrFqcn` is either the service ID or the FQCN of the controller. * Deprecated `Symfony\Bundle\FrameworkBundle\Controller\ControllerNameParser` + * The `container.service_locator` tag of `ServiceLocator`s is now autoconfigured. 4.0.0 -----