Changeset 56141
- Timestamp:
- 07/05/2023 05:39:55 PM (15 months ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/.github/workflows/phpunit-tests.yml
r55717 r56141 34 34 PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }} 35 35 LOCAL_PHP_MEMCACHED: ${{ false }} 36 SLOW_TESTS: 'external-http,media,restapi'37 36 38 37 jobs: … … 57 56 # - Submit the test results to the WordPress.org host test results. 58 57 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 }} 60 59 runs-on: ${{ matrix.os }} 61 60 permissions: … … 66 65 fail-fast: false 67 66 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' ] 69 68 os: [ ubuntu-latest ] 70 69 memcached: [ false ] 71 split_slow: [ false ]72 70 multisite: [ false, true ] 73 71 include: 74 # Additional "slow" jobs for PHP 5.6.75 - php: '5.6'76 os: ubuntu-latest77 memcached: false78 multisite: false79 split_slow: true80 - php: '5.6'81 os: ubuntu-latest82 memcached: false83 multisite: true84 split_slow: true85 72 # Include jobs for PHP 7.4 with memcached. 86 73 - php: '7.4' … … 175 162 run: npm run env:install 176 163 177 - name: Run slow PHPUnit tests178 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 tests182 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-required184 185 - name: Run PHPUnit tests for Multisite excluding slow tests186 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-headers188 189 164 - name: Run PHPUnit tests 190 if: ${{ matrix.php >= '7.0' }}191 165 run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} 192 166 193 167 - name: Run AJAX tests 194 if: ${{ ! matrix.split_slow }}195 168 run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c ${{ env.PHPUNIT_CONFIG }} --group ajax 196 169 197 170 - name: Run ms-files tests as a multisite install 198 if: ${{ matrix.multisite && ! matrix.split_slow}}171 if: ${{ matrix.multisite }} 199 172 run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c tests/phpunit/multisite.xml --group ms-files 200 173 201 174 - name: Run external HTTP tests 202 if: ${{ ! matrix.multisite && ! matrix.split_slow}}175 if: ${{ ! matrix.multisite }} 203 176 run: node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit --verbose -c phpunit.xml.dist --group external-http 204 177 205 178 # __fakegroup__ is excluded to force PHPUnit to ignore the <exclude> settings in phpunit.xml.dist. 206 179 - name: Run (Xdebug) tests 207 if: ${{ ! matrix.split_slow }}208 180 run: LOCAL_PHP_XDEBUG=true node ./tools/local-env/scripts/docker.js run php ./vendor/bin/phpunit -v --group xdebug --exclude-group __fakegroup__ 209 181 -
trunk/composer.json
r54355 r56141 11 11 }, 12 12 "require": { 13 "php": ">= 5.6"13 "php": ">=7.0" 14 14 }, 15 15 "require-dev": { -
trunk/phpcompat.xml.dist
r53800 r56141 5 5 <rule ref="PHPCompatibilityWP"/> 6 6 7 <!-- WordPress Core currently supports PHP 5.6+. -->8 <config name="testVersion" value=" 5.6-"/>7 <!-- WordPress Core currently supports PHP 7.0+. --> 8 <config name="testVersion" value="7.0-"/> 9 9 10 10 <!-- Only scan PHP files. --> -
trunk/src/readme.html
r55665 r56141 52 52 <h2>System Requirements</h2> 53 53 <ul> 54 <li><a href="https://secure.php.net/">PHP</a> version <strong> 5.6.20</strong> or greater.</li>54 <li><a href="https://secure.php.net/">PHP</a> version <strong>7.0</strong> or greater.</li> 55 55 <li><a href="https://www.mysql.com/">MySQL</a> version <strong>5.0</strong> or greater.</li> 56 56 </ul> -
trunk/src/wp-includes/compat.php
r56017 r56141 334 334 endif; 335 335 336 // random_int() was introduced in PHP 7.0.337 if ( ! function_exists( 'random_int' ) ) {338 require ABSPATH . WPINC . '/random_compat/random.php';339 }340 336 // sodium_crypto_box() was introduced in PHP 7.2. 341 337 if ( ! function_exists( 'sodium_crypto_box' ) ) { -
trunk/src/wp-includes/version.php
r56130 r56141 38 38 * @global string $required_php_version 39 39 */ 40 $required_php_version = ' 5.6.20';40 $required_php_version = '7.0.0'; 41 41 42 42 /** -
trunk/tests/phpunit/tests/admin/wpMediaListTable.php
r56072 r56141 115 115 * 116 116 * The warning that we should not see: 117 * PHP 5.6 -7.4: `Invalid argument supplied for foreach()`.117 * PHP <= 7.4: `Invalid argument supplied for foreach()`. 118 118 * PHP 8.0 and higher: `Warning: foreach() argument must be of type array|object, bool given`. 119 119 * -
trunk/tests/phpunit/tests/date/dateI18n.php
r55562 r56141 118 118 119 119 $expected = '2022-08-01 00:00:00 -03 -03:00 America/Buenos_Aires'; 120 if ( PHP_VERSION_ID < 70000 ) {121 // PHP 5.6.122 $expected = '2022-08-01 00:00:00 ART -03:00 America/Buenos_Aires';123 }124 120 125 121 $this->assertSame( $expected, date_i18n( 'Y-m-d H:i:s T P e', strtotime( '2022-08-01 00:00:00' ) ) ); -
trunk/tests/phpunit/tests/functions/wpListUtil.php
r55423 r56141 211 211 * @dataProvider data_wp_list_util_sort_arrays_of_arrays 212 212 * @dataProvider data_wp_list_util_sort_object_arrays 213 * @dataProvider data_wp_list_util_sort_non_existent_orderby_fields 213 214 * 214 215 * @covers WP_List_Util::sort … … 1003 1004 1004 1005 /** 1005 * Tests non-existent '$orderby' fields. 1006 * 1007 * In PHP < 7.0.0, the sorting behavior is different, which Core does not 1008 * currently handle. Until this is fixed, or the minimum PHP version is 1009 * raised to PHP 7.0.0+, these tests will be skipped on PHP < 7.0.0. 1010 * 1011 * @ticket 55300 1012 * 1013 * @dataProvider data_wp_list_util_sort_php_7_or_greater 1014 * 1015 * @covers WP_List_Util::sort 1016 * @covers ::wp_list_sort 1017 * 1018 * @param array $expected The expected array. 1019 * @param array $target_array The array to create a list from. 1020 * @param array $orderby Optional. Either the field name to order by or an array 1021 * of multiple orderby fields as `$orderby => $order`. 1022 * Default empty array. 1023 * @param string $order Optional. Either 'ASC' or 'DESC'. Only used if `$orderby` 1024 * is a string. Default 'ASC'. 1025 * @param bool $preserve_keys Optional. Whether to preserve keys. Default false. 1026 */ 1027 public function test_wp_list_util_sort_php_7_or_greater( $expected, $target_array, $orderby = array(), $order = 'ASC', $preserve_keys = false ) { 1028 if ( version_compare( PHP_VERSION, '7.0.0', '<' ) ) { 1029 $this->markTestSkipped( 'This test can only run on PHP 7.0 or greater due to an unstable sort order.' ); 1030 } 1031 1032 $util = new WP_List_Util( $target_array ); 1033 $actual = $util->sort( $orderby, $order, $preserve_keys ); 1034 1035 $this->assertEqualSetsWithIndex( 1036 $expected, 1037 $actual, 1038 'The sorted value did not match the expected value.' 1039 ); 1040 $this->assertEqualSetsWithIndex( 1041 $expected, 1042 $util->get_output(), 1043 '::get_output() did not return the expected value.' 1044 ); 1045 } 1046 1047 /** 1048 * Data provider for test_wp_list_util_sort_php_7_or_greater(). 1006 * Data provider for test_wp_list_util_sort(). 1049 1007 * 1050 1008 * @return array[] 1051 1009 */ 1052 public function data_wp_list_util_sort_ php_7_or_greater() {1010 public function data_wp_list_util_sort_non_existent_orderby_fields() { 1053 1011 return array( 1054 1012 'int[], int keys, $orderby a non-existent field, $order = ASC and $preserve_keys = false' => array(
Note: See TracChangeset
for help on using the changeset viewer.