mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 05:41:20 +01:00
parent
7023c592be
commit
529a19db11
@ -22,13 +22,14 @@
|
||||
"ext-tokenizer": "*",
|
||||
"amphp/amp": "^2.1",
|
||||
"amphp/byte-stream": "^1.5",
|
||||
"composer/package-versions-deprecated": "^1.8.0",
|
||||
"composer/semver": "^1.4 || ^2.0 || ^3.0",
|
||||
"composer/xdebug-handler": "^1.1",
|
||||
"dnoegel/php-xdg-base-dir": "^0.1.1",
|
||||
"felixfbecker/advanced-json-rpc": "^3.0.3",
|
||||
"felixfbecker/language-server-protocol": "^1.4",
|
||||
"netresearch/jsonmapper": "^1.0 || ^2.0 || ^3.0",
|
||||
"nikic/php-parser": "^4.9",
|
||||
"composer/package-versions-deprecated": "^1.8.0",
|
||||
"openlss/lib-array2xml": "^1.0",
|
||||
"sebastian/diff": "^3.0 || ^4.0",
|
||||
"symfony/console": "^3.4.17 || ^4.1.6 || ^5.0",
|
||||
|
@ -64,6 +64,8 @@ use function rmdir;
|
||||
use function scandir;
|
||||
use function sha1;
|
||||
use SimpleXMLElement;
|
||||
use XdgBaseDir\Xdg;
|
||||
|
||||
use function strpos;
|
||||
use function strrpos;
|
||||
use function strtolower;
|
||||
@ -876,6 +878,8 @@ class Config
|
||||
|
||||
if (isset($config_xml['cacheDirectory'])) {
|
||||
$config->cache_directory = (string)$config_xml['cacheDirectory'];
|
||||
} elseif ($user_cache_dir = (new Xdg())->getHomeCacheDir()) {
|
||||
$config->cache_directory = $user_cache_dir . '/psalm';
|
||||
} else {
|
||||
$config->cache_directory = sys_get_temp_dir() . '/psalm';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user