Skip to content

Commit d766eb8

Browse files
Revert "minor #35559 [FrameworkBundle] remove mention of the old Controller class (nicolas-grekas)"
This reverts commit 6bb64734894fe1a37f51ef499fdac37f101352b2, reversing changes made to 4cce23d9ca20e447239a42e57137e744a78f65f9.
1 parent 5000d58 commit d766eb8

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

DependencyInjection/RemoveEmptyControllerArgumentLocatorsPass.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ public function process(ContainerBuilder $container)
5151
}
5252
}
5353
if (!$reason) {
54+
// see Symfony\Component\HttpKernel\Controller\ContainerControllerResolver
55+
$controllers[$id.':'.$action] = $argumentRef;
56+
5457
if ('__invoke' === $action) {
5558
$controllers[$id] = $argumentRef;
5659
}

Tests/DependencyInjection/RemoveEmptyControllerArgumentLocatorsPassTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function testProcess()
4949

5050
$controllers = $container->getDefinition((string) $resolver->getArgument(0))->getArgument(0);
5151

52-
$this->assertSame(['c1::fooAction'], array_keys($controllers));
52+
$this->assertSame(['c1::fooAction', 'c1:fooAction'], array_keys($controllers));
5353
$this->assertSame(['bar'], array_keys($container->getDefinition((string) $controllers['c1::fooAction']->getValues()[0])->getArgument(0)));
5454

5555
$expectedLog = [
@@ -73,7 +73,7 @@ public function testInvoke()
7373
(new RemoveEmptyControllerArgumentLocatorsPass())->process($container);
7474

7575
$this->assertEquals(
76-
['invokable::__invoke', 'invokable'],
76+
['invokable::__invoke', 'invokable:__invoke', 'invokable'],
7777
array_keys($container->getDefinition((string) $resolver->getArgument(0))->getArgument(0))
7878
);
7979
}

0 commit comments

Comments
 (0)