From f87f03b5c0adc15c21f6f9a98f9a3b4c0143b49c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Fri, 10 Sep 2021 12:06:00 +0200 Subject: [PATCH] Move CenterResolverInterface auto-configuring to bundledefinition It seems that the service encountered in bundle loaded before does not works. --- src/Bundle/ChillMainBundle/ChillMainBundle.php | 3 +++ src/Bundle/ChillMainBundle/config/services/security.yaml | 6 ------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Bundle/ChillMainBundle/ChillMainBundle.php b/src/Bundle/ChillMainBundle/ChillMainBundle.php index ee9523273..d059443b5 100644 --- a/src/Bundle/ChillMainBundle/ChillMainBundle.php +++ b/src/Bundle/ChillMainBundle/ChillMainBundle.php @@ -3,6 +3,7 @@ namespace Chill\MainBundle; use Chill\MainBundle\Routing\LocalMenuBuilderInterface; +use Chill\MainBundle\Security\Resolver\CenterResolverInterface; use Symfony\Component\HttpKernel\Bundle\Bundle; use Symfony\Component\DependencyInjection\ContainerBuilder; use Chill\MainBundle\DependencyInjection\CompilerPass\SearchableServicesCompilerPass; @@ -27,6 +28,8 @@ class ChillMainBundle extends Bundle $container->registerForAutoconfiguration(LocalMenuBuilderInterface::class) ->addTag('chill.menu_builder'); + $container->registerForAutoconfiguration(CenterResolverInterface::class) + ->addTag('chill_main.center_resolver'); $container->addCompilerPass(new SearchableServicesCompilerPass()); $container->addCompilerPass(new ConfigConsistencyCompilerPass()); diff --git a/src/Bundle/ChillMainBundle/config/services/security.yaml b/src/Bundle/ChillMainBundle/config/services/security.yaml index 9925f972c..7590acb5f 100644 --- a/src/Bundle/ChillMainBundle/config/services/security.yaml +++ b/src/Bundle/ChillMainBundle/config/services/security.yaml @@ -8,12 +8,6 @@ services: arguments: - !tagged_iterator chill_main.center_resolver - # do not autowire the directory Security/Resolver - _instanceof: - Chill\MainBundle\Security\Resolver\CenterResolverInterface: - tags: - - chill_main.center_resolver - # do not autowire the directory Security/Resolver Chill\MainBundle\Security\Resolver\DefaultCenterResolver: autoconfigure: true