Revert "minor #35559 [FrameworkBundle] remove mention of the old Controller class (nicolas-grekas)"
This reverts commit6bb6473489
, reversing changes made to4cce23d9ca
.
This commit is contained in:
parent
8c778cbaa3
commit
fbea81c963
|
@ -51,6 +51,9 @@ class RemoveEmptyControllerArgumentLocatorsPass implements CompilerPassInterface
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!$reason) {
|
if (!$reason) {
|
||||||
|
// 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'], 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)));
|
$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'],
|
['invokable::__invoke', '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