Skip to content

Commit

Permalink
use error_log
Browse files Browse the repository at this point in the history
  • Loading branch information
kkmuffme committed Jul 10, 2022
1 parent ce7d4ee commit 6696d55
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Psalm/Config.php
Expand Up @@ -54,6 +54,7 @@
use function class_exists;
use function count;
use function dirname;
use function error_log;
use function explode;
use function extension_loaded;
use function file_exists;
Expand Down Expand Up @@ -94,7 +95,6 @@
use function substr;
use function substr_count;
use function sys_get_temp_dir;
use function trigger_error;
use function unlink;
use function version_compare;

Expand Down Expand Up @@ -1016,7 +1016,7 @@ private static function fromXmlAndPaths(
}

if (is_dir($config->cache_directory) === false && @mkdir($config->cache_directory, 0777, true) === false) {
trigger_error('Could not create cache directory: ' . $config->cache_directory, E_USER_ERROR);
error_log('Could not create cache directory: ' . $config->cache_directory);
}

if ($cwd) {
Expand Down
3 changes: 1 addition & 2 deletions src/Psalm/Internal/Provider/ParserCacheProvider.php
Expand Up @@ -30,7 +30,6 @@
use function scandir;
use function serialize;
use function touch;
use function trigger_error;
use function unlink;
use function unserialize;
use function usleep;
Expand Down Expand Up @@ -385,7 +384,7 @@ private function createCacheDirectory(string $parser_cache_directory): void
} catch (RuntimeException $e) {
// Race condition (#4483)
if (!is_dir($parser_cache_directory)) {
trigger_error('Could not create parser cache directory: ' . $parser_cache_directory, E_USER_ERROR);
error_log('Could not create parser cache directory: ' . $parser_cache_directory);
}
}
}
Expand Down

0 comments on commit 6696d55

Please sign in to comment.