mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 05:41:20 +01:00
Fix #965 - invalidate cache when changing plugins
This commit is contained in:
parent
b97972ebb3
commit
add7c14b44
@ -224,7 +224,7 @@ class Config
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
private $plugin_paths = [];
|
||||
public $plugin_paths = [];
|
||||
|
||||
/**
|
||||
* Static methods to be called after method checks have completed
|
||||
|
@ -31,6 +31,10 @@ class ClassLikeStorageCacheProvider
|
||||
$storage_dir . 'MethodStorage.php',
|
||||
];
|
||||
|
||||
if ($config->after_visit_classlikes) {
|
||||
$dependent_files = array_merge($dependent_files, $config->plugin_paths);
|
||||
}
|
||||
|
||||
foreach ($dependent_files as $dependent_file_path) {
|
||||
if (!file_exists($dependent_file_path)) {
|
||||
throw new \UnexpectedValueException($dependent_file_path . ' must exist');
|
||||
|
@ -32,6 +32,10 @@ class FileStorageCacheProvider
|
||||
$storage_dir . 'FunctionLikeParameter.php',
|
||||
];
|
||||
|
||||
if ($config->after_visit_classlikes) {
|
||||
$dependent_files = array_merge($dependent_files, $config->plugin_paths);
|
||||
}
|
||||
|
||||
foreach ($dependent_files as $dependent_file_path) {
|
||||
if (!file_exists($dependent_file_path)) {
|
||||
throw new \UnexpectedValueException($dependent_file_path . ' must exist');
|
||||
|
Loading…
x
Reference in New Issue
Block a user