diff --git a/composer.json b/composer.json index b8702fc6..f5caffb6 100644 --- a/composer.json +++ b/composer.json @@ -18,16 +18,16 @@ ], "require": { "php": "^8.1.0", - "brianium/paratest": "^7.2.0", - "nunomaduro/collision": "^7.6.0", + "brianium/paratest": "^7.2.2", + "nunomaduro/collision": "^7.7.0", "nunomaduro/termwind": "^1.15.1", "pestphp/pest-plugin": "^2.0.1", "pestphp/pest-plugin-arch": "^2.2.1", - "phpunit/phpunit": "^10.2.2" + "phpunit/phpunit": "^10.2.3" }, "conflict": { "webmozart/assert": "<1.11.0", - "phpunit/phpunit": ">10.2.2" + "phpunit/phpunit": ">10.2.3" }, "autoload": { "psr-4": { diff --git a/src/Concerns/Pipeable.php b/src/Concerns/Pipeable.php index 6e5a044b..15102870 100644 --- a/src/Concerns/Pipeable.php +++ b/src/Concerns/Pipeable.php @@ -5,7 +5,6 @@ declare(strict_types=1); namespace Pest\Concerns; use Closure; -use Pest\Expectation; /** * @internal diff --git a/src/Support/ExceptionTrace.php b/src/Support/ExceptionTrace.php index ba13a31d..8d57f1db 100644 --- a/src/Support/ExceptionTrace.php +++ b/src/Support/ExceptionTrace.php @@ -32,7 +32,7 @@ final class ExceptionTrace $message = str_replace(self::UNDEFINED_METHOD, 'Call to undefined method ', $message); - if (class_exists($class) && count(class_parents($class)) > 0 && array_values(class_parents($class))[0] === TestCase::class) { + if (class_exists((string) $class) && (is_countable(class_parents($class)) ? count(class_parents($class)) : 0) > 0 && array_values(class_parents($class))[0] === TestCase::class) { // @phpstan-ignore-line $message .= '. Did you forget to use the [uses()] function? Read more at: https://pestphp.com/docs/configuring-tests'; }