Skip to content

Commit

Permalink
minor #35559 [FrameworkBundle] remove mention of the old Controller c…
Browse files Browse the repository at this point in the history
…lass (nicolas-grekas)

This PR was merged into the 5.0 branch.

Discussion
----------

[FrameworkBundle] remove mention of the old Controller class

| Q             | A
| ------------- | ---
| Branch?       | 5.0
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Tickets       | -
| License       | MIT
| Doc PR        | -

This class is gone in 5.0.

Commits
-------

6620f8a [FrameworkBundle] remove mention of the old Controller class
  • Loading branch information
nicolas-grekas committed Feb 3, 2020
2 parents 4cce23d + 6620f8a commit 6bb6473
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
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
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
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 comments on commit 6bb6473

Please sign in to comment.