Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions lib/Adapter/Composer/ComposerFileToClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ private function populateCandidates(FilePath $filePath, array $prefixes)
$pathPrefixes = (array) $pathPrefixes;

// remove any relativeness from the paths
//
// TODO: realpath will return void if the path does not exist
// we should not depend on the file path existing.
// we should not depend on the file path existing.
$pathPrefixes = array_map(function ($pathPrefix) {
return Path::canonicalize($pathPrefix);
$canonicalizedPath = Path::canonicalize($pathPrefix);
$realPath = realpath($canonicalizedPath);
return $realPath ?: $canonicalizedPath;
}, $pathPrefixes);

foreach ($pathPrefixes as $pathPrefix) {
Expand Down