From 2ac37cb7309f140b7fb07b0602db5727d5fc2b3d Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Sat, 1 Nov 2025 12:11:20 +0100 Subject: [PATCH 1/2] Rework issue-bot so that it does not output the entire matrix to GITHUB_OUTPUT --- .github/workflows/issue-bot.yml | 38 +++++++++++++++++++---- issue-bot/src/Console/DownloadCommand.php | 2 +- 2 files changed, 33 insertions(+), 7 deletions(-) diff --git a/.github/workflows/issue-bot.yml b/.github/workflows/issue-bot.yml index 8079b19bf0..e2d09fb52c 100644 --- a/.github/workflows/issue-bot.yml +++ b/.github/workflows/issue-bot.yml @@ -28,7 +28,7 @@ jobs: runs-on: "ubuntu-latest" outputs: - matrix: ${{ steps.download-data.outputs.matrix }} + matrix: ${{ steps.shards.outputs.shards }} steps: - name: "Checkout" @@ -55,11 +55,15 @@ jobs: - name: "Download data" working-directory: "issue-bot" - id: download-data env: GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - run: echo "matrix=$(./console.php download)" >> $GITHUB_OUTPUT + run: ./console.php download > matrix.json + - name: "Output shards" + id: shards + working-directory: "issue-bot" + run: | + echo "shards=$(jq -c '{include: [range(length) | {shard: .}]}' matrix.json)" >> $GITHUB_OUTPUT - uses: actions/upload-artifact@v4 with: @@ -71,6 +75,11 @@ jobs: name: issue-cache path: issue-bot/tmp/issueCache.tmp + - uses: actions/upload-artifact@v4 + with: + name: matrix + path: issue-bot/matrix.json + analyse: name: "Analyse" needs: download @@ -109,15 +118,32 @@ jobs: attempt_limit: 5 attempt_delay: 1000 + - uses: Wandalen/wretry.action@v3.8.0 + with: + action: actions/download-artifact@v4 + with: | + name: matrix + path: issue-bot + attempt_limit: 5 + attempt_delay: 1000 + + - name: "Extract shard" + working-directory: "issue-bot" + id: chunk + run: | + echo "phpVersion=$(jq -r '.[${{ matrix.shard }}].phpVersion' matrix.json)" >> "$GITHUB_OUTPUT" + echo "playgroundExamples=$(jq -r '.[${{ matrix.shard }}].playgroundExamples' matrix.json)" >> "$GITHUB_OUTPUT" + echo "chunkNumber=$(jq -r '.[${{ matrix.shard }}].chunkNumber' matrix.json)" >> "$GITHUB_OUTPUT" + - name: "Run PHPStan" working-directory: "issue-bot" timeout-minutes: 5 - run: ./console.php run ${{ matrix.phpVersion }} ${{ matrix.playgroundExamples }} + run: ./console.php run ${{ steps.chunk.outputs.phpVersion }} ${{ steps.chunk.outputs.playgroundExamples }} - uses: actions/upload-artifact@v4 with: - name: results-${{ matrix.phpVersion }}-${{ matrix.chunkNumber }} - path: issue-bot/tmp/results-${{ matrix.phpVersion }}-*.tmp + name: results-${{ steps.chunk.outputs.phpVersion }}-${{ steps.chunk.outputs.chunkNumber }} + path: issue-bot/tmp/results-${{ steps.chunk.outputs.phpVersion }}-*.tmp evaluate: name: "Evaluate results" diff --git a/issue-bot/src/Console/DownloadCommand.php b/issue-bot/src/Console/DownloadCommand.php index 3edaa7c1e3..21b3d1dec6 100644 --- a/issue-bot/src/Console/DownloadCommand.php +++ b/issue-bot/src/Console/DownloadCommand.php @@ -141,7 +141,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int } } - $output->writeln(Json::encode(['include' => $matrix])); + $output->writeln(Json::encode($matrix)); return 0; } From 602791b691680f83b036ccbc7155723165556cf6 Mon Sep 17 00:00:00 2001 From: Ondrej Mirtes Date: Sat, 1 Nov 2025 13:46:50 +0100 Subject: [PATCH 2/2] Always analyse PHP 8.5 for every snippet --- issue-bot/src/Console/DownloadCommand.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/issue-bot/src/Console/DownloadCommand.php b/issue-bot/src/Console/DownloadCommand.php index 21b3d1dec6..7459305118 100644 --- a/issue-bot/src/Console/DownloadCommand.php +++ b/issue-bot/src/Console/DownloadCommand.php @@ -116,6 +116,9 @@ protected function execute(InputInterface $input, OutputInterface $output): int if (!in_array(80400, $resultPhpVersions, true)) { $resultPhpVersions[] = 80400; } + if (!in_array(80500, $resultPhpVersions, true)) { + $resultPhpVersions[] = 80500; + } if (!in_array($phpVersion, $resultPhpVersions, true)) { continue;