[FrameworkBundle] remove mention of the old Controller class
This commit is contained in:
parent
bf6d38412a
commit
6620f8afd9
@ -392,8 +392,6 @@ class FrameworkExtension extends Extension
|
|||||||
->addTag('controller.argument_value_resolver');
|
->addTag('controller.argument_value_resolver');
|
||||||
$container->registerForAutoconfiguration(AbstractController::class)
|
$container->registerForAutoconfiguration(AbstractController::class)
|
||||||
->addTag('controller.service_arguments');
|
->addTag('controller.service_arguments');
|
||||||
$container->registerForAutoconfiguration('Symfony\Bundle\FrameworkBundle\Controller\Controller')
|
|
||||||
->addTag('controller.service_arguments');
|
|
||||||
$container->registerForAutoconfiguration(DataCollectorInterface::class)
|
$container->registerForAutoconfiguration(DataCollectorInterface::class)
|
||||||
->addTag('data_collector');
|
->addTag('data_collector');
|
||||||
$container->registerForAutoconfiguration(FormTypeInterface::class)
|
$container->registerForAutoconfiguration(FormTypeInterface::class)
|
||||||
|
@ -51,9 +51,6 @@ class RemoveEmptyControllerArgumentLocatorsPass implements CompilerPassInterface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!$reason) {
|
if (!$reason) {
|
||||||
// Deprecated since Symfony 4.1. See Symfony\Component\HttpKernel\Controller\ContainerControllerResolver
|
|
||||||
$controllers[$id.':'.$action] = $argumentRef;
|
|
||||||
|
|
||||||
if ('__invoke' === $action) {
|
if ('__invoke' === $action) {
|
||||||
$controllers[$id] = $argumentRef;
|
$controllers[$id] = $argumentRef;
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ class RemoveEmptyControllerArgumentLocatorsPassTest extends TestCase
|
|||||||
|
|
||||||
$controllers = $container->getDefinition((string) $resolver->getArgument(0))->getArgument(0);
|
$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)));
|
$this->assertSame(['bar'], array_keys($container->getDefinition((string) $controllers['c1::fooAction']->getValues()[0])->getArgument(0)));
|
||||||
|
|
||||||
$expectedLog = [
|
$expectedLog = [
|
||||||
@ -73,7 +73,7 @@ class RemoveEmptyControllerArgumentLocatorsPassTest extends TestCase
|
|||||||
(new RemoveEmptyControllerArgumentLocatorsPass())->process($container);
|
(new RemoveEmptyControllerArgumentLocatorsPass())->process($container);
|
||||||
|
|
||||||
$this->assertEquals(
|
$this->assertEquals(
|
||||||
['invokable::__invoke', 'invokable:__invoke', 'invokable'],
|
['invokable::__invoke', 'invokable'],
|
||||||
array_keys($container->getDefinition((string) $resolver->getArgument(0))->getArgument(0))
|
array_keys($container->getDefinition((string) $resolver->getArgument(0))->getArgument(0))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user