mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 05:41:20 +01:00
Merge pull request #9044 from kkmuffme/absolute-autoloader-path-not-working
fix autoloader not working with absolute path
This commit is contained in:
commit
7d6a48ab14
@ -1065,7 +1065,14 @@ class Config
|
||||
$autoloader_path = $config->base_dir . DIRECTORY_SEPARATOR . $config_xml['autoloader'];
|
||||
|
||||
if (!file_exists($autoloader_path)) {
|
||||
throw new ConfigException('Cannot locate autoloader');
|
||||
// in here for legacy reasons where people put absolute paths but psalm resolved it relative
|
||||
if ($config_xml['autoloader']->__toString()[0] === '/') {
|
||||
$autoloader_path = $config_xml['autoloader']->__toString();
|
||||
}
|
||||
|
||||
if (!file_exists($autoloader_path)) {
|
||||
throw new ConfigException('Cannot locate autoloader');
|
||||
}
|
||||
}
|
||||
|
||||
$config->autoloader = realpath($autoloader_path);
|
||||
|
Loading…
x
Reference in New Issue
Block a user