Skip to content

Commit

Permalink
Fix cache clearing
Browse files Browse the repository at this point in the history
  • Loading branch information
gehrisandro committed Jun 17, 2024
1 parent 22679ab commit 611239e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Tester/MutationTestRunner.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,10 @@ private function clearCacheIfPluginVersionChanged(): void

$pluginVersion = InstalledVersions::getVersion('pestphp/pest-plugin-mutate');

if (($previousVersion = $cache->get('mutation-plugin-version') !== null) && $previousVersion !== $pluginVersion) { // @phpstan-ignore-line
/** @var ?string $previousVersion */
$previousVersion = $cache->get('mutation-plugin-version'); // @phpstan-ignore-line

if ($previousVersion !== null && $previousVersion !== $pluginVersion) {
$cache->clear(); // @phpstan-ignore-line
}

Expand Down

0 comments on commit 611239e

Please sign in to comment.