From 427fc8a3394cb8007bf3f83f2422aebf0d594378 Mon Sep 17 00:00:00 2001 From: Martin Linzmayer Date: Thu, 9 Oct 2025 15:47:18 +0200 Subject: [PATCH] ref: replace str_starts_with with strpos in ClockMock --- src/Util/ClockMock.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Util/ClockMock.php b/src/Util/ClockMock.php index ea3f18f18..004291d39 100644 --- a/src/Util/ClockMock.php +++ b/src/Util/ClockMock.php @@ -146,7 +146,7 @@ public static function register($class): void if (strpos($class, '\\Tests\\') > 0) { $ns = str_replace('\\Tests\\', '\\', $class); $mockedNs[] = substr($ns, 0, strrpos($ns, '\\')); - } elseif (str_starts_with($class, 'Tests\\')) { + } elseif (strpos($class, 'Tests\\') === 0) { $mockedNs[] = substr($class, 6, strrpos($class, '\\') - 6); } foreach ($mockedNs as $ns) {