Revert "minor #35559 [FrameworkBundle] remove mention of the old Controller class (nicolas-grekas)"

This reverts commit 6bb6473489, reversing
changes made to 4cce23d9ca.
This commit is contained in:
Nicolas Grekas 2020-03-10 16:57:32 +01:00
parent 8c778cbaa3
commit fbea81c963
2 changed files with 5 additions and 2 deletions

View File

@ -51,6 +51,9 @@ class RemoveEmptyControllerArgumentLocatorsPass implements CompilerPassInterface
}
}
if (!$reason) {
// see Symfony\Component\HttpKernel\Controller\ContainerControllerResolver
$controllers[$id.':'.$action] = $argumentRef;
if ('__invoke' === $action) {
$controllers[$id] = $argumentRef;
}

View File

@ -49,7 +49,7 @@ class RemoveEmptyControllerArgumentLocatorsPassTest extends TestCase
$controllers = $container->getDefinition((string) $resolver->getArgument(0))->getArgument(0);
$this->assertSame(['c1::fooAction'], array_keys($controllers));
$this->assertSame(['c1::fooAction', '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'],
['invokable::__invoke', 'invokable:__invoke', 'invokable'],
array_keys($container->getDefinition((string) $resolver->getArgument(0))->getArgument(0))
);
}