Skip to content
Permalink
Browse files

Invalidate cache when Psalm version changes

  • Loading branch information...
muglug committed May 8, 2019
1 parent 42b10e1 commit 1db0e38b08529c1975e503fd150d4c8e2c4bd1cc
@@ -479,7 +479,7 @@ public static function loadFromXMLFile($file_path, $base_dir)
try {
$config = self::loadFromXML($base_dir, $file_contents);
$config->hash = sha1($file_contents);
$config->hash = sha1($file_contents . \PSALM_VERSION);
} catch (ConfigException $e) {
throw new ConfigException(
'Problem parsing ' . $file_path . ":\n" . ' ' . $e->getMessage()
@@ -46,7 +46,7 @@ public function __construct(Config $config)
$this->modified_timestamps .= ' ' . filemtime($dependent_file_path);
}
$this->modified_timestamps .= PSALM_VERSION . $this->config->hash;
$this->modified_timestamps .= $this->config->hash;
}
/**
@@ -70,7 +70,7 @@ public function getCachedFileReferences()
{
$cache_directory = $this->config->getCacheDirectory();
if (!$cache_directory) {
if (!$cache_directory || $this->config_changed) {
return null;
}
@@ -47,7 +47,7 @@ public function __construct(Config $config)
$this->modified_timestamps .= ' ' . filemtime($dependent_file_path);
}
$this->modified_timestamps .= PSALM_VERSION . $this->config->hash;
$this->modified_timestamps .= $this->config->hash;
}
/**

0 comments on commit 1db0e38

Please sign in to comment.
You can’t perform that action at this time.