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

Appearance settings

Commit 5bdddc2

Browse filesBrowse files
bug #54187 [FrameworkBundle] Fix PHP 8.4 deprecation on ReflectionMethod (alexandre-daubois)
This PR was merged into the 5.4 branch. Discussion ---------- [FrameworkBundle] Fix PHP 8.4 deprecation on `ReflectionMethod` | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Issues | Part of #54180 | License | MIT This fixes: ``` 16x: Calling ReflectionMethod::__construct() with 1 argument is deprecated, use ReflectionMethod::createFromMethodName() instead 4x in RouterDebugCommandTest::testDumpAllRoutes from Symfony\Bundle\FrameworkBundle\Tests\Functional 4x in RouterDebugCommandTest::testSearchMultipleRoutesWithoutInteraction from Symfony\Bundle\FrameworkBundle\Tests\Functional 4x in RouterDebugCommandTest::testShowAliases from Symfony\Bundle\FrameworkBundle\Tests\Functional 2x in TextDescriptorTest::testDescribeRouteWithControllerLink from Symfony\Bundle\FrameworkBundle\Tests\Console\Descriptor 1x in RouterDebugCommandTest::testDumpOneRoute from Symfony\Bundle\FrameworkBundle\Tests\Functional ... ``` Commits ------- 8746765 [FrameworkBundle] Fix PHP 8.4 deprecation
2 parents ca6858f + 8746765 commit 5bdddc2
Copy full SHA for 5bdddc2

File tree

1 file changed

+1
-1
lines changed
Filter options

1 file changed

+1
-1
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Console/Descriptor/TextDescriptor.php
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ private function formatControllerLink($controller, string $anchorText, ?callable
559559
} elseif (!\is_string($controller)) {
560560
return $anchorText;
561561
} elseif (str_contains($controller, '::')) {
562-
$r = new \ReflectionMethod($controller);
562+
$r = new \ReflectionMethod(...explode('::', $controller, 2));
563563
} else {
564564
$r = new \ReflectionFunction($controller);
565565
}

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.