Skip to content

Commit bd90e10

Browse files
ondrejmirtesphpstan-bot
authored andcommitted
Add bisect command for finding first bad PHPStan commit
- New `phpstan bisect` command that performs binary search between two releases - Downloads phpstan.phar for each tested commit from the phpstan/phpstan repo - Queries GitHub API (Compare endpoint) for commit list between releases - Reads GitHub token from GITHUB_TOKEN/GH_TOKEN env vars or ~/.composer/auth.json - Runs analysis with downloaded phar and asks user if result is good or bad - Reports first bad commit with phpstan-src commit links from commit description - Tests for command configuration, token reading, and argument building
1 parent b4c5164 commit bd90e10

File tree

3 files changed

+540
-0
lines changed

3 files changed

+540
-0
lines changed

bin/phpstan

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<?php declare(strict_types=1);
33

44
use PHPStan\Command\AnalyseCommand;
5+
use PHPStan\Command\BisectCommand;
56
use PHPStan\Command\ClearResultCacheCommand;
67
use PHPStan\Command\DiagnoseCommand;
78
use PHPStan\Command\DumpParametersCommand;
@@ -129,6 +130,7 @@ use Symfony\Component\Console\Helper\ProgressBar;
129130
$reversedComposerAutoloaderProjectPaths = array_values(array_unique(array_reverse($composerAutoloaderProjectPaths)));
130131

131132
$application->add(new AnalyseCommand($reversedComposerAutoloaderProjectPaths, $analysisStartTime));
133+
$application->add(new BisectCommand());
132134
$application->add(new WorkerCommand($reversedComposerAutoloaderProjectPaths));
133135
$application->add(new ClearResultCacheCommand($reversedComposerAutoloaderProjectPaths));
134136
$application->add(new FixerWorkerCommand($reversedComposerAutoloaderProjectPaths));

0 commit comments

Comments
 (0)