Skip to content

Commit

Permalink
Fix duplicate paths in composerAutoloaderProjectPaths on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm authored Sep 18, 2024
1 parent 46f343e commit 84a7397
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bin/phpstan
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,11 @@ use Symfony\Component\Console\Helper\ProgressBar;
$application->setDefaultCommand('analyse');
ProgressBar::setFormatDefinition('file_download', ' [%bar%] %percent:3s%% %fileSize%');

$composerAutoloaderProjectPaths = array_map(function(string $s): string {
return str_replace(DIRECTORY_SEPARATOR, '/', $s);
}, $composerAutoloaderProjectPaths);
$reversedComposerAutoloaderProjectPaths = array_values(array_unique(array_reverse($composerAutoloaderProjectPaths)));

$application->add(new AnalyseCommand($reversedComposerAutoloaderProjectPaths, $analysisStartTime));
$application->add(new WorkerCommand($reversedComposerAutoloaderProjectPaths));
$application->add(new ClearResultCacheCommand($reversedComposerAutoloaderProjectPaths));
Expand Down

0 comments on commit 84a7397

Please # to comment.