8000 Revert "minor #35559 [FrameworkBundle] remove mention of the old Cont… · symfony/symfony@fbea81c · GitHub
[go: up one dir, main page]

Skip to content

Commit fbea81c

Browse files
Revert "minor #35559 [FrameworkBundle] remove mention of the old Controller class (nicolas-grekas)"
This reverts commit 6bb6473, reversing changes made to 4cce23d.
1 parent 8c778cb commit fbea81c

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/Symfony/Component/HttpKernel/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
}

src/Symfony/Component/HttpKernel/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)
0