Merge branch '4.x' into 5.x

This commit is contained in:
nuno maduro
2026-03-21 13:20:25 +00:00
5 changed files with 8 additions and 6 deletions

View File

@ -6,7 +6,7 @@ namespace Pest;
function version(): string
{
return '5.0.0-rc.1';
return '5.0.0-rc.2';
}
function testDirectory(string $file = ''): string

View File

@ -26,6 +26,7 @@ final class ExceptionTrace
return $closure();
} catch (Throwable $throwable) {
if (Str::startsWith($message = $throwable->getMessage(), self::UNDEFINED_METHOD)) {
// @phpstan-ignore-next-line
$class = preg_match('/^Call to undefined method ([^:]+)::/', $message, $matches) === false ? null : $matches[1];
$message = str_replace(self::UNDEFINED_METHOD, 'Call to undefined method ', $message);