mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +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\Internal\Provider\Providers;
|
||||
use RuntimeException;
|
||||
|
||||
use function file_exists;
|
||||
use function file_put_contents;
|
||||
@ -115,14 +114,11 @@ class Cache
|
||||
$compressed = $serialized;
|
||||
}
|
||||
|
||||
if ($compressed === false) {
|
||||
throw new RuntimeException(
|
||||
'Failed to compress cache data',
|
||||
);
|
||||
}
|
||||
|
||||
if ($compressed !== false) {
|
||||
file_put_contents($path, $compressed, LOCK_EX);
|
||||
}
|
||||
// TODO: Error handling
|
||||
}
|
||||
|
||||
public function getCacheDirectory(): ?string
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user