Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Mar 30, 2020
1 parent 0a2f51f commit 8d399fd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Framework/MockObject/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -1039,6 +1039,10 @@ private function isConstructor(\ReflectionMethod $method): bool
return true;
}

if (\PHP_MAJOR_VERSION >= 8) {
return false;
}

$className = \strtolower($method->getDeclaringClass()->getName());

return $methodName === $className;
Expand Down

1 comment on commit 8d399fd

@Ocramius
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! 🎉

Please sign in to comment.