From a2591eeca07cf92cef6ac1981e53b57afe53c008 Mon Sep 17 00:00:00 2001 From: Tomas Vondracek Date: Sat, 21 Nov 2026 22:10:07 +0100 Subject: [PATCH] ci: run code analysis on PHP 8.5 and fix the Rector job - Add PHP 8.5 to the matrix. - The Rector job keyed its Composer cache on matrix.php-version, which it doesn't have; key it on the PHP version it runs. - Drop symfony-cli, which no step uses. - Read-only token permissions, and cancel runs superseded by a newer push. --- .github/workflows/code_analysis.yaml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/code_analysis.yaml b/.github/workflows/code_analysis.yaml index cc3ba24..8445d91 100644 --- a/.github/workflows/code_analysis.yaml +++ b/.github/workflows/code_analysis.yaml @@ -6,6 +6,14 @@ on: branches: - main +permissions: + contents: read + +# A newer push to the same branch or pull request makes the older run moot. +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: COMPOSER_CACHE_DIR: /tmp/composer-cache @@ -13,15 +21,16 @@ jobs: rector_analysis: name: Rector analysis runs-on: ubuntu-latest + env: + PHP_VERSION: 8.4 steps: - uses: actions/checkout@v4 - uses: shivammathur/setup-php@v2 with: - php-version: 8.4 + php-version: ${{ env.PHP_VERSION }} extensions: json, mbstring, pdo, curl, pdo_sqlite coverage: none - tools: symfony-cli env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -29,7 +38,7 @@ jobs: uses: actions/cache@v4 with: path: ${{ env.COMPOSER_CACHE_DIR }} - key: ${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('**/composer.json') }} + key: ${{ runner.os }}-${{ env.PHP_VERSION }}-${{ hashFiles('**/composer.json') }} - run: composer install --no-progress --no-interaction - run: vendor/bin/rector process -n --no-progress-bar --ansi @@ -38,7 +47,7 @@ jobs: strategy: fail-fast: false matrix: - php-version: [ '8.2', '8.3', '8.4' ] + php-version: [ '8.2', '8.3', '8.4', '8.5' ] actions: - name: Coding Standard # tip: add "--ansi" to commands in CI to make them full of colors @@ -62,7 +71,6 @@ jobs: php-version: ${{ matrix.php-version }} extensions: json, mbstring, pdo, curl, pdo_sqlite coverage: none - tools: symfony-cli env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}