8000 [FrameworkBundle] remove mention of the old Controller class by nicolas-grekas · Pull Request #35559 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[FrameworkBundle] remove mention of the old Controller class #35559

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[FrameworkBundle] remove mention of the old Controller class
  • Loading branch information
nicolas-grekas committed Feb 2, 2020
commit 6620f8afd933390813d7a50e8284132c698d55ec
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,6 @@ public function load(array $configs, ContainerBuilder $container)
->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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ public function process(ContainerBuilder $container)
}
}
if (!$reason) {
// Deprecated since Symfony 4.1. See Symfony\Component\HttpKernel\Controller\ContainerControllerResolver
$controllers[$id.':'.$action] = $argumentRef;

if ('__invoke' === $action) {
$controllers[$id] = $argumentRef;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function testProcess()

$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 = [
Expand All @@ -73,7 +73,7 @@ public function testInvoke()
(new RemoveEmptyControllerArgumentLocatorsPass())->process($container);

$this->assertEquals(
['invokable::__invoke', 'invokable:__invoke', 'invokable'],
['invokable::__invoke', 'invokable'],
array_keys($container->getDefinition((string) $resolver->getArgument(0))->getArgument(0))
);
}
Expand Down
0