Make WordPress Core


Ignore:
Timestamp:
07/05/2023 05:39:55 PM (16 months ago)
Author:
johnbillion
Message:

General: Increase the minimum supported version of PHP to 7.0.0.

This also removes the random compat library which is no longer necessary, and adjusts unit tests and CI workflows that no longer need to take PHP 5.6 into account.

Thank you for your service, PHP 5. Onwards!

Props SergeyBiryukov, mukesh27, dingo_d, audrasjb, jrf, costdev, azaozz, JavierCasares, hellofromTonya, samiamnot, spacedmonkey, masteradhoc, knutsp, garyjones, chanthaboune

Fixes #57345

File:
1 edited

Legend:

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

    r55717 r56141  
    3434  PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }}
    3535  LOCAL_PHP_MEMCACHED: ${{ false }}
    36   SLOW_TESTS: 'external-http,media,restapi'
    3736
    3837jobs:
     
    5756  # - Submit the test results to the WordPress.org host test results.
    5857  test-php:
    59     name: ${{ matrix.php }}${{ matrix.multisite && ' multisite' || '' }}${{ matrix.split_slow && ' slow tests' || '' }}${{ matrix.memcached && ' with memcached' || '' }} on ${{ matrix.os }}
     58    name: ${{ matrix.php }}${{ matrix.multisite && ' multisite' || '' }}${{ matrix.memcached && ' with memcached' || '' }} on ${{ matrix.os }}
    6059    runs-on: ${{ matrix.os }}
    6160    permissions:
     
    6665      fail-fast: false
    6766      matrix:
    68         php: [ '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2' ]
     67        php: [ '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2' ]
    6968        os: [ ubuntu-latest ]
    7069        memcached: [ false ]
    71         split_slow: [ false ]
    7270        multisite: [ false, true ]
    7371        include:
    74           # Additional "slow" jobs for PHP 5.6.
    75           - php: '5.6'
    76             os: ubuntu-latest
    77             memcached: false
    78             multisite: false
    79             split_slow: true
    80           - php: '5.6'
    81             os: ubuntu-latest
    82             memcached: false
    83             multisite: true
    84             split_slow: true
    8572          # Include jobs for PHP 7.4 with memcached.
    8673          - php: '7.4'
     
    175162        run: npm run env:install
    176163
    177       - name: Run slow PHPUnit tests
    178         if: ${{ matrix.split_slow }}
    179         run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} --group ${{ env.SLOW_TESTS }}
    180 
    181       - name: Run PHPUnit tests for single site excluding slow tests
    182         if: ${{ matrix.php < '7.0' && ! matrix.split_slow && ! matrix.multisite }}
    183         run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} --exclude-group ${{ env.SLOW_TESTS }},ajax,ms-files,ms-required
    184 
    185       - name: Run PHPUnit tests for Multisite excluding slow tests
    186         if: ${{ matrix.php < '7.0' && ! matrix.split_slow && matrix.multisite }}
    187         run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} --exclude-group ${{ env.SLOW_TESTS }},ajax,ms-files,ms-excluded,oembed-headers
    188 
    189164      - name: Run PHPUnit tests
    190         if: ${{ matrix.php >= '7.0' }}
    191165        run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }}
    192166
    193167      - name: Run AJAX tests
    194         if: ${{ ! matrix.split_slow }}
    195168        run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} --group ajax
    196169
    197170      - name: Run ms-files tests as a multisite install
    198         if: ${{ matrix.multisite && ! matrix.split_slow }}
     171        if: ${{ matrix.multisite }}
    199172        run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c tests/phpunit/multisite.xml --group ms-files
    200173
    201174      - name: Run external HTTP tests
    202         if: ${{ ! matrix.multisite && ! matrix.split_slow }}
     175        if: ${{ ! matrix.multisite }}
    203176        run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c phpunit.xml.dist --group external-http
    204177
    205178      # __fakegroup__ is excluded to force PHPUnit to ignore the <exclude> settings in phpunit.xml.dist.
    206179      - name: Run (Xdebug) tests
    207         if: ${{ ! matrix.split_slow }}
    208180        run: LOCAL_PHP_XDEBUG=true node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit -v --group xdebug --exclude-group __fakegroup__
    209181
Note: See TracChangeset for help on using the changeset viewer.