From 37f9776ebb81edd4511e47f39dabdad6b9db67da Mon Sep 17 00:00:00 2001 From: Abdul Malik Ikhsan Date: Fri, 17 Oct 2025 13:10:34 +0700 Subject: [PATCH] [Reflection] Allow New_ on ReflectionResolver::resolveFunctionLikeReflectionFromCall() --- src/Reflection/ReflectionResolver.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Reflection/ReflectionResolver.php b/src/Reflection/ReflectionResolver.php index 9ec329c1086..c2c98d67f60 100644 --- a/src/Reflection/ReflectionResolver.php +++ b/src/Reflection/ReflectionResolver.php @@ -191,7 +191,7 @@ public function resolveMethodReflectionFromMethodCall(MethodCall $methodCall): ? } public function resolveFunctionLikeReflectionFromCall( - MethodCall|FuncCall|StaticCall $call + MethodCall|FuncCall|StaticCall|New_ $call ): MethodReflection | FunctionReflection | null { if ($call instanceof MethodCall) { return $this->resolveMethodReflectionFromMethodCall($call); @@ -201,6 +201,10 @@ public function resolveFunctionLikeReflectionFromCall( return $this->resolveMethodReflectionFromStaticCall($call); } + if ($call instanceof New_) { + return $this->resolveMethodReflectionFromNew($call); + } + return $this->resolveFunctionReflectionFromFuncCall($call); }