From 6620f8afd933390813d7a50e8284132c698d55ec Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Sun, 2 Feb 2020 16:14:55 +0100 Subject: [PATCH] [FrameworkBundle] remove mention of the old Controller class --- .../DependencyInjection/FrameworkExtension.php | 2 -- .../RemoveEmptyControllerArgumentLocatorsPass.php | 3 --- .../RemoveEmptyControllerArgumentLocatorsPassTest.php | 4 ++-- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php index 9d356e5aed..005086436e 100644 --- a/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php +++ b/src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php @@ -392,8 +392,6 @@ class FrameworkExtension extends Extension ->addTag('controller.argument_value_resolver'); $container->registerForAutoconfiguration(AbstractController::class) ->addTag('controller.service_arguments'); - $container->registerForAutoconfiguration('Symfony\Bundle\FrameworkBundle\Controller\Controller') - ->addTag('controller.service_arguments'); $container->registerForAutoconfiguration(DataCollectorInterface::class) ->addTag('data_collector'); $container->registerForAutoconfiguration(FormTypeInterface::class) diff --git a/src/Symfony/Component/HttpKernel/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPass.php b/src/Symfony/Component/HttpKernel/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPass.php index 596b6188f6..79e67374b2 100644 --- a/src/Symfony/Component/HttpKernel/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPass.php +++ b/src/Symfony/Component/HttpKernel/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPass.php @@ -51,9 +51,6 @@ class RemoveEmptyControllerArgumentLocatorsPass implements CompilerPassInterface } } if (!$reason) { - // Deprecated since Symfony 4.1. See Symfony\Component\HttpKernel\Controller\ContainerControllerResolver - $controllers[$id.':'.$action] = $argumentRef; - if ('__invoke' === $action) { $controllers[$id] = $argumentRef; } diff --git a/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPassTest.php b/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPassTest.php index b5e55bdea9..6c840aedca 100644 --- a/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPassTest.php +++ b/src/Symfony/Component/HttpKernel/Tests/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPassTest.php @@ -49,7 +49,7 @@ class RemoveEmptyControllerArgumentLocatorsPassTest extends TestCase $controllers = $container->getDefinition((string) $resolver->getArgument(0))->getArgument(0); - $this->assertSame(['c1::fooAction', 'c1:fooAction'], array_keys($controllers)); + $this->assertSame(['c1::fooAction'], array_keys($controllers)); $this->assertSame(['bar'], array_keys($container->getDefinition((string) $controllers['c1::fooAction']->getValues()[0])->getArgument(0))); $expectedLog = [ @@ -73,7 +73,7 @@ class RemoveEmptyControllerArgumentLocatorsPassTest extends TestCase (new RemoveEmptyControllerArgumentLocatorsPass())->process($container); $this->assertEquals( - ['invokable::__invoke', 'invokable:__invoke', 'invokable'], + ['invokable::__invoke', 'invokable'], array_keys($container->getDefinition((string) $resolver->getArgument(0))->getArgument(0)) ); }