Skip to content

Commit 14946a8

Browse files
committed
Fix compatibility
1 parent 113ab06 commit 14946a8

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

src/Reflection/Php/BuiltinMethodReflection.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ public function isPrivate(): bool;
3636

3737
public function isPublic(): bool;
3838

39-
public function isConstructor(): bool;
40-
4139
public function getPrototype(): self;
4240

4341
public function isDeprecated(): TrinaryLogic;

src/Reflection/Php/FakeBuiltinMethodReflection.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,6 @@ public function isPublic(): bool
7979
return true;
8080
}
8181

82-
public function isConstructor(): bool
83-
{
84-
return false;
85-
}
86-
8782
public function getPrototype(): BuiltinMethodReflection
8883
{
8984
throw new \ReflectionException();

src/Reflection/Php/PhpClassReflectionExtension.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,8 @@ private function createMethod(
562562
$isInternal = false;
563563
$isFinal = false;
564564
if (
565-
$methodReflection->isConstructor()
565+
$methodReflection instanceof NativeBuiltinMethodReflection
566+
&& $methodReflection->isConstructor()
566567
&& $declaringClass->getFileName() !== false
567568
) {
568569
foreach ($methodReflection->getParameters() as $parameter) {

0 commit comments

Comments
 (0)