From cf7c5c2a0deedd391ab857f5689c7e95e1049fc4 Mon Sep 17 00:00:00 2001 From: Matt Brown Date: Thu, 25 Jan 2018 11:07:16 -0500 Subject: [PATCH] Fix #470 - follow vendor directory symlinks --- src/Psalm/Config.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Psalm/Config.php b/src/Psalm/Config.php index ab905098b..eacf5ec73 100644 --- a/src/Psalm/Config.php +++ b/src/Psalm/Config.php @@ -845,7 +845,11 @@ class Config */ public function getComposerClassMap() { - $vendor_dir = $this->base_dir . 'vendor'; // this should ideally not be hardcoded + $vendor_dir = realpath($this->base_dir . 'vendor'); // this should ideally not be hardcoded + + if (!$vendor_dir) { + return []; + } $autoload_files_classmap = $vendor_dir . DIRECTORY_SEPARATOR . 'composer' . DIRECTORY_SEPARATOR . 'autoload_classmap.php';