Skip to content

Commit 748f8fb

Browse files
Merge branch '4.0'
* 4.0: Fix typos [Routing] remove useless failing mocks [appveyor] Workaround GitHub disabling of low versions of TLS Use long array syntax [Routing] Fix GC control of PHP-DSL [Routing] Don't throw 405 when scheme requirement doesn't match [Routing] Revert throwing 405 on missed slash/scheme redirections [WebProfilerBundle] fix test after ajax path updated Fix ArrayInput::toString() for InputArgument::IS_ARRAY args Update excluded_ajax_paths for sf4 Add missing use for RoleInterface Add missing use of Role [Routing] fix CS add container.autowiring.strict_mode to 3.4 docs Set controller without __invoke method from invokable class [VarDumper] Fixed PHPDoc
2 parents 0256070 + cddab67 commit 748f8fb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Routing/AnnotatedRouteControllerLoader.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@ class AnnotatedRouteControllerLoader extends AnnotationClassLoader
2929
*/
3030
protected function configureRoute(Route $route, \ReflectionClass $class, \ReflectionMethod $method, $annot)
3131
{
32-
$route->setDefault('_controller', $class->getName().'::'.$method->getName());
32+
if ('__invoke' === $method->getName()) {
33+
$route->setDefault('_controller', $class->getName());
34+
} else {
35+
$route->setDefault('_controller', $class->getName().'::'.$method->getName());
36+
}
3337
}
3438

3539
/**

0 commit comments

Comments
 (0)