From a918ce8c538b07e02c590351c5af5ad7bae0da7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Tamarelle?= Date: Wed, 9 Oct 2024 11:16:00 +0200 Subject: [PATCH] Fix getReflectionFunction --- psalm-baseline.xml | 6 ++++++ tests/Internal/Codebase/InternalCallMapHandlerTest.php | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 987aab124ad..364c5e92dae 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -2338,6 +2338,12 @@ + + + + + + diff --git a/tests/Internal/Codebase/InternalCallMapHandlerTest.php b/tests/Internal/Codebase/InternalCallMapHandlerTest.php index e852bf5d9bc..deb423163b0 100644 --- a/tests/Internal/Codebase/InternalCallMapHandlerTest.php +++ b/tests/Internal/Codebase/InternalCallMapHandlerTest.php @@ -521,10 +521,10 @@ private function getReflectionFunction(string $functionName): ?ReflectionFunctio try { if (strpos($functionName, '::') !== false) { if (PHP_VERSION_ID < 8_03_00) { - [$className, , $methodName] = explode(':', $functionName, 3); - return new ReflectionMethod($className, $methodName); + return new ReflectionMethod($functionName); } + // @psalm-suppress UndefinedMethod return ReflectionMethod::createFromMethodName($functionName); }