Make WordPress Core

Changeset 59168


Ignore:
Timestamp:
10/04/2024 02:07:03 PM (9 months ago)
Author:
desrosj
Message:

Build/Test Tools: Enable testing for PHP 8.4.

With PHP 8.4 due out in November later this year, contributors have been working on ensuring WordPress 6.7 is as compatible as possible. Enough progress has been made during this release cycle where PHPUnit tests now run successfully with no failures reported.

This change enables PHP 8.4 testing throughout Core’s GitHub Action workflows to ensure no new problems are introduced going forward.

There are two exceptions to this:

  • The Importer plugin has some compatibility issues that produce test failures. There is an open pull request upstream, but these problematic tests have been marked skipped when running on PHP 8.4 until that PR is merged.
  • Since no stable versions of xDebug with PHP 8.4 support have been published, these tests are also skipped for now.

Props jrf, desrosj.
See #62061.

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/.github/workflows/phpunit-tests.yml

    r59049 r59168  
    4646      matrix:
    4747        os: [ ubuntu-latest ]
    48         php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]
     48        php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
    4949        db-type: [ 'mysql' ]
    5050        db-version: [ '5.7', '8.0', '8.1', '8.2', '8.3' ]
     
    117117      matrix:
    118118        os: [ ubuntu-latest ]
    119         php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]
     119        php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
    120120        db-type: [ 'mariadb' ]
    121121        db-version: [ '10.4', '10.6', '10.11', '11.2' ]
  • trunk/.github/workflows/reusable-phpunit-tests-v3.yml

    r58789 r59168  
    183183      # __fakegroup__ is excluded to force PHPUnit to ignore the <exclude> settings in phpunit.xml.dist.
    184184      - name: Run (Xdebug) tests
    185         if: ${{ inputs.php != '8.3' }}
     185        if: ${{ inputs.php != '8.4' }}
    186186        continue-on-error: ${{ inputs.allow-errors }}
    187187        run: LOCAL_PHP_XDEBUG=true node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit -v --group xdebug --exclude-group __fakegroup__
  • trunk/.github/workflows/upgrade-testing.yml

    r58575 r59168  
    4444      matrix:
    4545        os: [ 'ubuntu-latest' ]
    46         php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]
     46        php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
    4747        db-type: [ 'mysql' ]
    4848        db-version: [ '5.7', '8.0' ]
     
    9494      matrix:
    9595        os: [ 'ubuntu-latest' ]
    96         php: [ '8.0', '8.1', '8.2', '8.3' ]
     96        php: [ '8.0', '8.1', '8.2', '8.3', '8.4' ]
    9797        db-type: [ 'mysql' ]
    9898        db-version: [ '5.7', '8.0' ]
     
    144144      matrix:
    145145        os: [ 'ubuntu-latest' ]
    146         php: [ '8.0', '8.1', '8.2', '8.3' ]
     146        php: [ '8.0', '8.1', '8.2', '8.3', '8.4' ]
    147147        db-type: [ 'mysql' ]
    148148        db-version: [ '5.7', '8.0' ]
  • trunk/.version-support-php.json

    r58575 r59168  
    77        "8.1",
    88        "8.2",
    9         "8.3"
     9        "8.3",
     10        "8.4"
    1011    ],
    1112    "6-6": [
  • trunk/tests/phpunit/tests/import/parser.php

    r59085 r59168  
    2626     */
    2727    public function test_malformed_wxr() {
     28        if ( PHP_VERSION_ID >= 80400 ) {
     29            $this->markTestSkipped( 'The Importer plugin is not ready for PHP 8.4 yet. This skip should be removed once it is.' );
     30        }
     31
    2832        $file = DIR_TESTDATA . '/export/malformed.xml';
    2933
     
    4347     */
    4448    public function test_invalid_wxr() {
     49        if ( PHP_VERSION_ID >= 80400 ) {
     50            $this->markTestSkipped( 'The Importer plugin is not ready for PHP 8.4 yet. This skip should be removed once it is.' );
     51        }
     52
    4553        $f1 = DIR_TESTDATA . '/export/missing-version-tag.xml';
    4654        $f2 = DIR_TESTDATA . '/export/invalid-version-tag.xml';
     
    6270     */
    6371    public function test_wxr_version_1_1() {
     72        if ( PHP_VERSION_ID >= 80400 ) {
     73            $this->markTestSkipped( 'The Importer plugin is not ready for PHP 8.4 yet. This skip should be removed once it is.' );
     74        }
     75
    6476        $file = DIR_TESTDATA . '/export/valid-wxr-1.1.xml';
    6577
     
    160172     */
    161173    public function test_wxr_version_1_0() {
     174        if ( PHP_VERSION_ID >= 80400 ) {
     175            $this->markTestSkipped( 'The Importer plugin is not ready for PHP 8.4 yet. This skip should be removed once it is.' );
     176        }
     177
    162178        $file = DIR_TESTDATA . '/export/valid-wxr-1.0.xml';
    163179
     
    258274     */
    259275    public function test_escaped_cdata_closing_sequence() {
     276        if ( PHP_VERSION_ID >= 80400 ) {
     277            $this->markTestSkipped( 'The Importer plugin is not ready for PHP 8.4 yet. This skip should be removed once it is.' );
     278        }
     279
    260280        $file = DIR_TESTDATA . '/export/crazy-cdata-escaped.xml';
    261281
Note: See TracChangeset for help on using the changeset viewer.