8000 bug #54254 [HttpKernel] Fix creating `ReflectionMethod` with only one… · symfony/symfony@37e436f · GitHub
[go: up one dir, main page]

Skip to content

Commit 37e436f

Browse files
bug #54254 [HttpKernel] Fix creating ReflectionMethod with only one argument (alexandre-daubois)
This PR was merged into the 6.4 branch. Discussion ---------- [HttpKernel] Fix creating `ReflectionMethod` with only one argument | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | Part of #54180 | License | MIT Remaining PHP 8.4 deprecations on 6.4 Commits ------- f32d633 [HttpKernel] Fix creating `ReflectionMethod` with only one argument
2 parents 9344c26 + f32d633 commit 37e436f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpKernel/Event/ControllerEvent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function setController(callable $controller, ?array $attributes = null):
7070
if (\is_array($controller) && method_exists(...$controller)) {
7171
$this->controllerReflector = new \ReflectionMethod(...$controller);
7272
} elseif (\is_string($controller) && str_contains($controller, '::')) {
73-
$this->controllerReflector = new \ReflectionMethod($controller);
73+
$this->controllerReflector = new \ReflectionMethod(...explode('::', $controller, 2));
7474
} else {
7575
$this->controllerReflector = new \ReflectionFunction($controller(...));
7676
}

0 commit comments

Comments
 (0)
0