Skip to content

Fix #85: Clear stat cache in FileCache::set() #318

Fix #85: Clear stat cache in FileCache::set()

Fix #85: Clear stat cache in FileCache::set() #318

Triggered via push January 6, 2025 14:38
Status Success
Total duration 47s
Artifacts

mutation.yml

on: push
Matrix: mutation / roave-infection
Fit to window
Zoom out
Zoom in

Annotations

4 warnings
mutation / PHP 8.3-ubuntu-latest
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
mutation / PHP 8.3-ubuntu-latest: src/FileCache.php#L108
Escaped Mutant for Mutator "FunctionCallRemoval": --- Original +++ New @@ @@ if (!$this->existsAndNotExpired($file) || ($filePointer = @fopen($file, 'rb')) === false) { return $default; } - flock($filePointer, LOCK_SH); + $value = stream_get_contents($filePointer); flock($filePointer, LOCK_UN); fclose($filePointer);
mutation / PHP 8.3-ubuntu-latest: src/FileCache.php#L217
Escaped Mutant for Mutator "TrueValue": --- Original +++ New @@ @@ foreach ($keys as $key) { $this->delete($key); } - return true; + return false; } public function has(string $key) : bool {
mutation / PHP 8.3-ubuntu-latest: src/FileCache.php#L340
Escaped Mutant for Mutator "LogicalAnd": --- Original +++ New @@ @@ if (is_dir($path)) { return true; } - $result = !is_file($path) && mkdir(directory: $path, recursive: true) && is_dir($path); + $result = !is_file($path) && mkdir(directory: $path, recursive: true) || is_dir($path); if ($result) { chmod($path, $this->directoryMode); }