diff --git a/composer.json b/composer.json index d9a55865..f8cba757 100644 --- a/composer.json +++ b/composer.json @@ -24,11 +24,11 @@ "pestphp/pest-plugin": "^3.0.0", "pestphp/pest-plugin-arch": "^3.1.1", "pestphp/pest-plugin-mutate": "^3.0.5", - "phpunit/phpunit": "^11.5.15" + "phpunit/phpunit": "^11.5.33" }, "conflict": { "filp/whoops": "<2.16.0", - "phpunit/phpunit": ">11.5.15", + "phpunit/phpunit": ">11.5.33", "sebastian/exporter": "<6.0.0", "webmozart/assert": "<1.11.0" }, diff --git a/overrides/Runner/ResultCache/DefaultResultCache.php b/overrides/Runner/ResultCache/DefaultResultCache.php index fde6bad9..3eb41a83 100644 --- a/overrides/Runner/ResultCache/DefaultResultCache.php +++ b/overrides/Runner/ResultCache/DefaultResultCache.php @@ -49,7 +49,7 @@ use const DIRECTORY_SEPARATOR; use const LOCK_EX; use PHPUnit\Framework\TestStatus\TestStatus; -use PHPUnit\Runner\DirectoryCannotBeCreatedException; +use PHPUnit\Runner\DirectoryDoesNotExistException; use PHPUnit\Runner\Exception; use PHPUnit\Util\Filesystem; @@ -98,28 +98,28 @@ final class DefaultResultCache implements ResultCache $this->cacheFilename = $filepath ?? $_ENV['PHPUNIT_RESULT_CACHE'] ?? self::DEFAULT_RESULT_CACHE_FILENAME; } - public function setStatus(string $id, TestStatus $status): void + public function setStatus(ResultCacheId $id, TestStatus $status): void { if ($status->isSuccess()) { return; } - $this->defects[$id] = $status; + $this->defects[$id->asString()] = $status; } - public function status(string $id): TestStatus + public function status(ResultCacheId $id): TestStatus { - return $this->defects[$id] ?? TestStatus::unknown(); + return $this->defects[$id->asString()] ?? TestStatus::unknown(); } - public function setTime(string $id, float $time): void + public function setTime(ResultCacheId $id, float $time): void { - $this->times[$id] = $time; + $this->times[$id->asString()] = $time; } - public function time(string $id): float + public function time(ResultCacheId $id): float { - return $this->times[$id] ?? 0.0; + return $this->times[$id->asString()] ?? 0.0; } public function mergeWith(self $other): void @@ -179,7 +179,7 @@ final class DefaultResultCache implements ResultCache public function persist(): void { if (! Filesystem::createDirectory(dirname($this->cacheFilename))) { - throw new DirectoryCannotBeCreatedException($this->cacheFilename); + throw new DirectoryDoesNotExistException(dirname($this->cacheFilename)); } $data = [ diff --git a/src/Result.php b/src/Result.php index 98e9e8b6..233ffa2d 100644 --- a/src/Result.php +++ b/src/Result.php @@ -40,7 +40,7 @@ final class Result */ public static function exitCode(Configuration $configuration, TestResult $result): int { - if ($result->wasSuccessfulIgnoringPhpunitWarnings()) { + if ($result->wasSuccessful()) { if ($configuration->failOnWarning()) { $warnings = $result->numberOfTestsWithTestTriggeredPhpunitWarningEvents() + count($result->warnings()) @@ -60,7 +60,7 @@ final class Result return self::FAILURE_EXIT; } - if ($result->wasSuccessfulIgnoringPhpunitWarnings()) { + if ($result->wasSuccessful()) { if ($configuration->failOnRisky() && $result->hasTestConsideredRiskyEvents()) { $returnCode = self::FAILURE_EXIT; }