mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
Fix Phar-scoped issue checks
This commit is contained in:
parent
0c2b10709e
commit
aab8eed219
@ -28,8 +28,8 @@ return [
|
||||
function ($filePath, $prefix, $contents) {
|
||||
if ($filePath === 'src/Psalm/Config.php') {
|
||||
return str_replace(
|
||||
$prefix . '\Composer\Autoload\ClassLoader',
|
||||
'Composer\Autoload\ClassLoader',
|
||||
[$prefix . '\Composer\Autoload\ClassLoader', '\'Psalm\\\\Issue\\\\\''],
|
||||
['Composer\Autoload\ClassLoader', '\'' . $prefix . '\\\\Psalm\\\\Issue\\\\\''],
|
||||
$contents
|
||||
);
|
||||
}
|
||||
|
@ -1469,6 +1469,7 @@ class Config
|
||||
return $this->issue_handlers[$issue_type]->getReportingLevelForFile($file_path);
|
||||
}
|
||||
|
||||
// this string is replaced by scoper for Phars, so be careful
|
||||
$issue_class = 'Psalm\\Issue\\' . $issue_type;
|
||||
|
||||
if (!class_exists($issue_class) || !is_a($issue_class, \Psalm\Issue\CodeIssue::class, true)) {
|
||||
|
Loading…
Reference in New Issue
Block a user