mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 12:55:26 +01:00
Make cache writes fail silent
This commit is contained in:
parent
66848306f9
commit
503c38df03
@ -4,7 +4,6 @@ namespace Psalm\Internal;
|
|||||||
|
|
||||||
use Psalm\Config;
|
use Psalm\Config;
|
||||||
use Psalm\Internal\Provider\Providers;
|
use Psalm\Internal\Provider\Providers;
|
||||||
use RuntimeException;
|
|
||||||
|
|
||||||
use function file_exists;
|
use function file_exists;
|
||||||
use function file_put_contents;
|
use function file_put_contents;
|
||||||
@ -115,13 +114,10 @@ class Cache
|
|||||||
$compressed = $serialized;
|
$compressed = $serialized;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($compressed === false) {
|
if ($compressed !== false) {
|
||||||
throw new RuntimeException(
|
file_put_contents($path, $compressed, LOCK_EX);
|
||||||
'Failed to compress cache data',
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
// TODO: Error handling
|
||||||
file_put_contents($path, $compressed, LOCK_EX);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getCacheDirectory(): ?string
|
public function getCacheDirectory(): ?string
|
||||||
|
Loading…
Reference in New Issue
Block a user