diff --git a/src/PHPSemVerChecker/Finder/Finder.php b/src/PHPSemVerChecker/Finder/Finder.php index ded3c1b..2791d1a 100644 --- a/src/PHPSemVerChecker/Finder/Finder.php +++ b/src/PHPSemVerChecker/Finder/Finder.php @@ -28,7 +28,10 @@ public function find($path, array $includes, array $excludes = []) $finder->notPath($exclude); } - $files = iterator_to_array($finder->getIterator()); + $files = []; + foreach ($finder as $file) { + $files[] = $file->getRealpath(); + } return $files; } diff --git a/src/PHPSemVerChecker/Reporter/Reporter.php b/src/PHPSemVerChecker/Reporter/Reporter.php index a96b279..f4a1e68 100644 --- a/src/PHPSemVerChecker/Reporter/Reporter.php +++ b/src/PHPSemVerChecker/Reporter/Reporter.php @@ -90,8 +90,7 @@ protected function getLocation(Operation $operation) if ($isFullPath) { $location = $operation->getLocation(); } else { - $fullPath = realpath($operation->getLocation()); - $location = str_replace($this->cwd . DIRECTORY_SEPARATOR, '', $fullPath); + $location = str_replace($this->cwd . DIRECTORY_SEPARATOR, '', $operation->getLocation()); } return $location . '#' . $operation->getLine(); }