-
Notifications
You must be signed in to change notification settings - Fork 478
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
nette/di - patch for PHP 8.4 support
From nette/di@a548b1c
- Loading branch information
1 parent
30a51ac
commit 1245ea7
Showing
3 changed files
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- src/DI/DependencyChecker.php 2023-10-02 21:58:38 | ||
+++ src/DI/DependencyChecker.php 2024-07-07 09:24:35 | ||
@@ -147,7 +147,9 @@ | ||
$flip = array_flip($classes); | ||
foreach ($functions as $name) { | ||
if (strpos($name, '::')) { | ||
- $method = new ReflectionMethod($name); | ||
+ $method = PHP_VERSION_ID < 80300 | ||
+ ? new ReflectionMethod($name) | ||
+ : ReflectionMethod::createFromMethodName($name); | ||
$class = $method->getDeclaringClass(); | ||
if (isset($flip[$class->name])) { | ||
continue; |