Fix #85: Clear stat cache in FileCache::set()
#318
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);
}
|