Skip to content

Commit

Permalink
Do not run PHP bug workaround on PHP 8+ where it's fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed Nov 16, 2021
1 parent 30ff227 commit 6573959
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Reflection/Php/PhpMethodReflection.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,10 @@ public function getName(): string
$name = $this->reflection->getName();
$lowercaseName = strtolower($name);
if ($lowercaseName === $name) {
if (PHP_VERSION_ID >= 80000) {
return $name;
}

// fix for https://bugs.php.net/bug.php?id=74939
foreach ($this->getDeclaringClass()->getNativeReflection()->getTraitAliases() as $traitTarget) {
$correctName = $this->getMethodNameWithCorrectCase($name, $traitTarget);
Expand Down

0 comments on commit 6573959

Please sign in to comment.