From 9d48585b0e10c4a81f7f216409e8ef38e047881c Mon Sep 17 00:00:00 2001 From: Matthew Brown Date: Sat, 3 Mar 2018 19:05:15 -0500 Subject: [PATCH] Fix #552 - fix path that stubs are loaded from --- src/Psalm/Config.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Psalm/Config.php b/src/Psalm/Config.php index 304cd37f0..03e82afe1 100644 --- a/src/Psalm/Config.php +++ b/src/Psalm/Config.php @@ -461,11 +461,11 @@ class Config if (isset($config_xml->stubs) && isset($config_xml->stubs->file)) { /** @var \SimpleXMLElement $stub_file */ foreach ($config_xml->stubs->file as $stub_file) { - $file_path = realpath($stub_file['name']); + $file_path = realpath($config->base_dir . DIRECTORY_SEPARATOR . $stub_file['name']); if (!$file_path) { throw new Exception\ConfigException( - 'Cannot resolve stubfile path ' . getcwd() . '/' . $stub_file['name'] + 'Cannot resolve stubfile path ' . $config->base_dir . DIRECTORY_SEPARATOR . $stub_file['name'] ); }