From 77a4a017428455b5c434f714c43b2580287fde20 Mon Sep 17 00:00:00 2001 From: jrfnl Date: Thu, 2 Oct 2025 22:37:33 +0200 Subject: [PATCH] GH Actions: update for the release of PHP 8.5 ... which is expected to be released this Thursday. * Builds against PHP 8.5 are no longer allowed to fail. * Update PHP version on which code coverage is run (high should now be 8.5). * Add _allowed to fail_ build against PHP 8.6. * Update "tested against" badge in the README. Note: for some workflows I use "nightly" for the "next" PHP version, for some `8.6`. While it may appear there is no difference and this is true for the better part of the year, there is a difference for about two months. To illustrate, consider PHP 8.5: * PHP "nightly" refers to the PHP `master` branch, so was PHP 8.5 until the PHP 8.5 was branched off when the first RC was cut in September. * As of that moment, "nightly" basically became PHP 8.6, so to test against PHP 8.5, one would need to explicitly request `8.5`. * As of the release of PHP 8.5, it is expected for "nightly" to be PHP 8.6, so the difference is moot again. For that reason, the unit test workflow uses the explicit `8.6` version for PHP "next". --- .github/workflows/build-phar.yml | 2 +- .github/workflows/end-to-end-tests.yml | 4 ++-- .github/workflows/test.yml | 16 ++++++++-------- README.md | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-phar.yml b/.github/workflows/build-phar.yml index 6ef752e1e4..953714986b 100644 --- a/.github/workflows/build-phar.yml +++ b/.github/workflows/build-phar.yml @@ -43,7 +43,7 @@ jobs: strategy: matrix: # Deliberately missing PHP 8.0 as that PHAR is build and used in the test workflow. - php: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.1', '8.2', '8.3', '8.4', 'nightly'] + php: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.1', '8.2', '8.3', '8.4', '8.5', 'nightly'] name: "Build Phar on PHP: ${{ matrix.php }}" diff --git a/.github/workflows/end-to-end-tests.yml b/.github/workflows/end-to-end-tests.yml index 07da89974f..9f046a0728 100644 --- a/.github/workflows/end-to-end-tests.yml +++ b/.github/workflows/end-to-end-tests.yml @@ -27,12 +27,12 @@ jobs: strategy: matrix: - php: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5'] + php: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5', 'nightly'] # yamllint disable-line rule:line-length name: "E2E PHP: ${{ matrix.php }}" - continue-on-error: ${{ matrix.php == '8.5' }} + continue-on-error: ${{ matrix.php == 'nightly' }} steps: - name: Prepare git to leave line endings alone diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 559b259b75..e286e7b569 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -54,7 +54,7 @@ jobs: # code conditions. matrix: os: ['ubuntu-latest', 'windows-latest'] - php: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5'] + php: ['5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5', '8.6'] custom_ini: [false] exclude: @@ -76,7 +76,7 @@ jobs: - php: '5.5' os: 'windows-latest' skip_tests: true - - php: '8.4' + - php: '8.5' skip_tests: true # The default libxml library on Ubuntu images is a little out of date. @@ -107,7 +107,7 @@ jobs: # yamllint disable-line rule:line-length name: "PHP: ${{ matrix.php }} ${{ matrix.custom_ini && ' with custom ini settings' || '' }}${{ matrix.libxml_minor && format( ' with libxml {0}', matrix.libxml_minor ) || '' }} (${{ matrix.os == 'ubuntu-latest' && 'Linux' || 'Win' }})" - continue-on-error: ${{ matrix.php == '8.5' }} + continue-on-error: ${{ matrix.php == '8.6' }} steps: - name: Prepare git to leave line endings alone @@ -226,7 +226,7 @@ jobs: - name: Install Composer dependencies uses: "ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520" # 3.1.1 with: - composer-options: ${{ matrix.php == '8.5' && '--ignore-platform-req=php+' || '' }} + composer-options: ${{ matrix.php == '8.6' && '--ignore-platform-req=php+' || '' }} custom-cache-suffix: $(date -u "+%Y-%m") - name: 'PHPCS: set the path to PHP' @@ -237,14 +237,14 @@ jobs: run: php "vendor/bin/phpunit" tests/AllTests.php --no-coverage # Do one test run against the complete test suite in CBF mode to ensure all tests can run in CBF mode. - - name: 'PHPUnit: run the full test suite without code coverage in CBF mode (PHP 8.3 only)' - if: ${{ matrix.php == '8.3' }} + - name: 'PHPUnit: run the full test suite without code coverage in CBF mode (PHP 8.4 only)' + if: ${{ matrix.php == '8.4' }} run: php "vendor/bin/phpunit" tests/AllTests.php --exclude-group nothing --no-coverage env: PHP_CODESNIFFER_CBF: '1' - name: 'PHPUnit: run select tests in CBF mode' - if: ${{ matrix.skip_tests != true && matrix.php != '8.3' }} + if: ${{ matrix.skip_tests != true && matrix.php != '8.4' }} run: php "vendor/bin/phpunit" tests/AllTests.php --group CBF --exclude-group nothing --no-coverage env: PHP_CODESNIFFER_CBF: '1' @@ -274,7 +274,7 @@ jobs: strategy: matrix: os: ['ubuntu-latest', 'windows-latest'] - php: ['8.4'] + php: ['8.5'] custom_ini: [false] include: diff --git a/README.md b/README.md index 8278abe490..ff56ef853f 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ [![License](https://img.shields.io/github/license/PHPCSStandards/PHP_CodeSniffer)](https://github.com/PHPCSStandards/PHP_CodeSniffer/blob/HEAD/licence.txt) ![Minimum PHP Version](https://img.shields.io/packagist/dependency-v/squizlabs/php_codesniffer/php.svg) -[![Tested on PHP 5.4 to 8.4](https://img.shields.io/badge/tested%20on-PHP%205.4%20|%205.5%20|%205.6%20|%207.0%20|%207.1%20|%207.2%20|%207.3%20|%207.4%20|%208.0%20|%208.1%20|%208.2%20|%208.3%20|%208.4-brightgreen.svg?maxAge=2419200)][GHA-test] +[![Tested on PHP 5.4 to 8.5](https://img.shields.io/badge/tested%20on-PHP%205.4%20|%205.5%20|%205.6%20|%207.0%20|%207.1%20|%207.2%20|%207.3%20|%207.4%20|%208.0%20|%208.1%20|%208.2%20|%208.3%20|%208.4%20|%208.5-brightgreen.svg?maxAge=2419200)][GHA-test] [GHA-test]: https://github.com/PHPCSStandards/PHP_CodeSniffer/actions/workflows/test.yml