Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit449c60f

Browse files
bug#40802 [FrameworkBundle] Fix array controller link in debug:router (fancyweb)
This PR was merged into the 5.2 branch.Discussion----------[FrameworkBundle] Fix array controller link in debug:router| Q | A| ------------- | ---| Branch? | 5.2| Bug fix? | yes| New feature? | no| Deprecations? | no| Tickets | -| License | MIT| Doc PR | -`debug:router` is broken when you add a route in the Kernel (seehttps://symfony.com/doc/current/configuration/micro_kernel_trait.html) because `kernel` is not a class and triggers a `\ReflectionException`. The code in the exception handling always expect `$controller` to be a string.Commits-------be964bd [FrameworkBundle] Fix array controller link in debug:router
2 parents255b7b6 +be964bd commit449c60f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,10 @@ private function formatControllerLink($controller, string $anchorText, callable
554554
$r =new \ReflectionFunction($controller);
555555
}
556556
}catch (\ReflectionException$e) {
557+
if (\is_array($controller)) {
558+
$controller =implode('::',$controller);
559+
}
560+
557561
$id =$controller;
558562
$method ='__invoke';
559563

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp