Skip to content

Commit 84a7397

Browse files
authored
Fix duplicate paths in composerAutoloaderProjectPaths on Windows
1 parent 46f343e commit 84a7397

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

bin/phpstan

+4
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,11 @@ use Symfony\Component\Console\Helper\ProgressBar;
159159
$application->setDefaultCommand('analyse');
160160
ProgressBar::setFormatDefinition('file_download', ' [%bar%] %percent:3s%% %fileSize%');
161161

162+
$composerAutoloaderProjectPaths = array_map(function(string $s): string {
163+
return str_replace(DIRECTORY_SEPARATOR, '/', $s);
164+
}, $composerAutoloaderProjectPaths);
162165
$reversedComposerAutoloaderProjectPaths = array_values(array_unique(array_reverse($composerAutoloaderProjectPaths)));
166+
163167
$application->add(new AnalyseCommand($reversedComposerAutoloaderProjectPaths, $analysisStartTime));
164168
$application->add(new WorkerCommand($reversedComposerAutoloaderProjectPaths));
165169
$application->add(new ClearResultCacheCommand($reversedComposerAutoloaderProjectPaths));

0 commit comments

Comments
 (0)