Changeset 61459
- Timestamp:
- 01/09/2026 11:45:46 AM (5 weeks ago)
- Location:
- trunk
- Files:
-
- 5 deleted
- 21 edited
-
.github/workflows/install-testing.yml (modified) (1 diff)
-
.github/workflows/local-docker-environment.yml (modified) (1 diff)
-
.github/workflows/phpunit-tests.yml (modified) (6 diffs)
-
.github/workflows/reusable-upgrade-testing.yml (modified) (1 diff)
-
.github/workflows/upgrade-develop-testing.yml (modified) (2 diffs)
-
.github/workflows/upgrade-testing.yml (modified) (4 diffs)
-
.version-support-php.json (modified) (1 diff)
-
composer.json (modified) (1 diff)
-
docker-compose.yml (modified) (1 diff)
-
phpcompat.xml.dist (modified) (1 diff)
-
src/readme.html (modified) (1 diff)
-
src/wp-admin/includes/class-wp-site-health.php (modified) (1 diff)
-
src/wp-admin/includes/misc.php (modified) (1 diff)
-
src/wp-includes/compat.php (modified) (1 diff)
-
src/wp-includes/pluggable.php (modified) (2 diffs)
-
src/wp-includes/version.php (modified) (1 diff)
-
tests/phpunit/includes/abstract-testcase.php (modified) (2 diffs)
-
tests/phpunit/tests/admin/wpMediaListTable.php (modified) (1 diff)
-
tests/phpunit/tests/compat/arrayKeyFirst.php (deleted)
-
tests/phpunit/tests/compat/arrayKeyLast.php (deleted)
-
tests/phpunit/tests/compat/isCountable.php (deleted)
-
tools/local-env/mysql-old-php.conf (deleted)
-
tools/local-env/old-php-mysql-84.override.yml (deleted)
-
tools/local-env/scripts/install.js (modified) (1 diff)
-
tools/local-env/scripts/start.js (modified) (1 diff)
-
tools/local-env/scripts/utils.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/.github/workflows/install-testing.yml
r61245 r61459 2 2 # 3 3 # This workflow is not meant to test wordpress-develop checkouts, but rather tagged versions officially available on WordPress.org. 4 # 5 # This workflow is triggered for all WordPress versions that are currently receiving security updates. It therefore needs to 6 # retain support for older PHP and database versions. 4 7 name: Installation Tests 5 8 -
trunk/.github/workflows/local-docker-environment.yml
r61245 r61459 107 107 - db-version: '9.3' 108 108 - db-version: '9.4' 109 # MySQL 9.0+ will not work on PHP 7.2 & 7.3. See https://core.trac.wordpress.org/ticket/61218.110 - php: '7.2'111 db-version: '9.5'112 - php: '7.3'113 db-version: '9.5'114 109 # No PHP 8.5 + Memcached support yet. 115 110 - php: '8.5' -
trunk/.github/workflows/phpunit-tests.yml
r61245 r61459 73 73 matrix: 74 74 os: [ ubuntu-24.04 ] 75 php: [ '7. 2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ]75 php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ] 76 76 db-type: [ 'mysql' ] 77 77 db-version: [ '5.7', '8.0', '8.4' ] … … 150 150 matrix: 151 151 os: [ ubuntu-24.04 ] 152 php: [ '7. 2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ]152 php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ] 153 153 db-type: [ 'mariadb' ] 154 154 db-version: [ '5.5', '10.3', '10.5', '10.6', '10.11', '11.4', '11.8' ] … … 202 202 matrix: 203 203 os: [ ubuntu-24.04 ] 204 php: [ '7. 2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ]204 php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ] 205 205 db-type: [ 'mysql', 'mariadb' ] 206 206 db-version: [ '9.5', '12.0' ] … … 210 210 211 211 exclude: 212 # MySQL 9.0+ will not work on PHP <= 7.3 because mysql_native_password was removed. See https://core.trac.wordpress.org/ticket/61218.213 - php: '7.2'214 db-version: '9.5'215 - php: '7.3'216 db-version: '9.5'217 212 # Exclude version combinations that don't exist. 218 213 - db-type: 'mariadb' … … 249 244 fail-fast: false 250 245 matrix: 251 php: [ '7. 2', '7.4', '8.0', '8.4' ]246 php: [ '7.4', '8.0', '8.4' ] 252 247 db-type: [ 'mysql' ] 253 248 db-version: [ '8.4' ] … … 278 273 fail-fast: false 279 274 matrix: 280 php: [ '7. 2', '8.4' ]275 php: [ '7.4', '8.4' ] 281 276 db-version: [ '8.4', '11.8' ] 282 277 db-type: [ 'mysql', 'mariadb' ] -
trunk/.github/workflows/reusable-upgrade-testing.yml
r61209 r61459 76 76 -e MYSQL_ROOT_PASSWORD="root" 77 77 -e MYSQL_DATABASE="test_db" 78 --entrypoint sh ${{ inputs.db-type }}:${{ inputs.db-version }}79 -c "exec docker-entrypoint.sh mysqld${{ inputs.db-type == 'mysql' && contains( fromJSON('["7.2", "7.3"]'), inputs.php ) && ' --default-authentication-plugin=mysql_native_password' || '' }}"80 78 81 79 steps: -
trunk/.github/workflows/upgrade-develop-testing.yml
r61222 r61459 64 64 matrix: 65 65 os: [ 'ubuntu-24.04' ] 66 php: [ '7. 2', '8.4' ]66 php: [ '7.4', '8.4' ] 67 67 db-type: [ 'mysql' ] 68 68 db-version: [ '5.7', '8.4' ] 69 # WordPress 4.9 is the oldest version that supports PHP 7.2.70 wp: [ ' 4.9', '6.7', '6.8', '6.9-RC1' ]69 # WordPress 5.3 is the oldest version that supports PHP 7.4. 70 wp: [ '5.3', '6.7', '6.8', '6.9-RC1' ] 71 71 multisite: [ false, true ] 72 73 exclude:74 # The PHP <= 7.3/MySQL 8.4 jobs currently fail due to mysql_native_password being disabled by default. See https://core.trac.wordpress.org/ticket/61218.75 - php: '7.2'76 db-version: '8.4'77 # WordPress 4.9 does not support PHP 8.4.78 - php: '8.4'79 wp: '4.9'80 72 with: 81 73 os: ${{ matrix.os }} … … 99 91 matrix: 100 92 os: [ 'ubuntu-24.04' ] 101 php: [ '7. 2', '8.4' ]93 php: [ '7.4', '8.4' ] 102 94 db-type: [ 'mysql' ] 103 95 db-version: [ '8.4' ] 104 # WordPress 4.9 is the oldest version that supports PHP 7.2.105 96 wp: [ '6.7', '6.8' ] 106 97 multisite: [ false, true ] 107 108 exclude:109 # The PHP <= 7.3/MySQL 8.4 jobs currently fail due to mysql_native_password being disabled by default. See https://core.trac.wordpress.org/ticket/61218.110 - php: '7.2'111 db-version: '8.4'112 98 with: 113 99 os: ${{ matrix.os }} -
trunk/.github/workflows/upgrade-testing.yml
r61245 r61459 69 69 matrix: 70 70 os: [ 'ubuntu-24.04' ] 71 php: [ '7. 2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ]71 php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ] 72 72 db-type: [ 'mysql' ] 73 73 db-version: [ '5.7', '8.0', '8.4', '9.5' ] 74 74 wp: [ '6.7', '6.8' ] 75 75 multisite: [ false, true ] 76 77 exclude:78 # The PHP <= 7.3/MySQL 8.4 jobs currently fail due to mysql_native_password being disabled by default. See https://core.trac.wordpress.org/ticket/61218.79 - php: '7.2'80 db-version: '8.4'81 - php: '7.3'82 db-version: '8.4'83 # MySQL 9.0+ will not work on PHP 7.2 & 7.3. See https://core.trac.wordpress.org/ticket/61218.84 - php: '7.2'85 db-version: '9.5'86 - php: '7.3'87 db-version: '9.5'88 76 with: 89 77 os: ${{ matrix.os }} … … 106 94 matrix: 107 95 os: [ 'ubuntu-24.04' ] 108 php: [ '7. 2', '7.4', '8.0', '8.4' ]96 php: [ '7.4', '8.0', '8.4' ] 109 97 db-type: [ 'mysql' ] 110 98 db-version: [ '5.7', '8.4' ] 111 99 wp: [ '6.0', '6.3', '6.4', '6.5' ] 112 100 multisite: [ false, true ] 113 114 exclude: 115 # The PHP <= 7.3/MySQL 8.4 jobs currently fail due to mysql_native_password being disabled by default. See https://core.trac.wordpress.org/ticket/61218. 116 - php: '7.2' 117 db-version: '8.4' 118 with: 119 os: ${{ matrix.os }} 120 php: ${{ matrix.php }} 121 db-type: ${{ matrix.db-type }} 122 db-version: ${{ matrix.db-version }} 123 wp: ${{ matrix.wp }} 124 new-version: ${{ inputs.new-version && inputs.new-version || 'latest' }} 125 multisite: ${{ matrix.multisite }} 126 127 # Tests 5.x releases where the WordPress database version changed on the oldest and newest supported versions of PHP 7. 101 with: 102 os: ${{ matrix.os }} 103 php: ${{ matrix.php }} 104 db-type: ${{ matrix.db-type }} 105 db-version: ${{ matrix.db-version }} 106 wp: ${{ matrix.wp }} 107 new-version: ${{ inputs.new-version && inputs.new-version || 'latest' }} 108 multisite: ${{ matrix.multisite }} 109 110 # Tests 5.x releases where the WordPress database version changed on the only supported version of PHP 7. 128 111 upgrade-tests-wp-5x-php-7x-mysql: 129 112 name: ${{ matrix.wp }} to ${{ inputs.new-version && inputs.new-version || 'latest' }} … … 136 119 matrix: 137 120 os: [ 'ubuntu-24.04' ] 138 php: [ '7. 2', '7.4' ]121 php: [ '7.4' ] 139 122 db-type: [ 'mysql' ] 140 123 db-version: [ '5.7', '8.4' ] 141 124 wp: [ '5.0', '5.1', '5.3', '5.4', '5.5', '5.6', '5.9' ] 142 125 multisite: [ false, true ] 143 144 exclude:145 # The PHP <= 7.3/MySQL 8.4 jobs currently fail due to mysql_native_password being disabled by default. See https://core.trac.wordpress.org/ticket/61218.146 - php: '7.2'147 db-version: '8.4'148 126 with: 149 127 os: ${{ matrix.os }} … … 200 178 matrix: 201 179 os: [ 'ubuntu-24.04' ] 202 php: [ '7. 2', '7.3', '7.4' ]180 php: [ '7.4' ] 203 181 db-type: [ 'mysql' ] 204 182 db-version: [ '5.7', '8.0', '8.4', '9.5' ] 205 183 wp: [ '4.7' ] 206 184 multisite: [ false, true ] 207 208 exclude:209 # The PHP <= 7.3/MySQL 8.4 jobs currently fail due to mysql_native_password being disabled by default. See https://core.trac.wordpress.org/ticket/61218.210 - php: '7.2'211 db-version: '8.4'212 - php: '7.3'213 db-version: '8.4'214 # MySQL 9.0+ will not work on PHP 7.2 & 7.3. See https://core.trac.wordpress.org/ticket/61218.215 - php: '7.2'216 db-version: '9.5'217 - php: '7.3'218 db-version: '9.5'219 185 with: 220 186 os: ${{ matrix.os }} -
trunk/.version-support-php.json
r61222 r61459 1 1 { 2 2 "7-0": [ 3 "7.2",4 "7.3",5 3 "7.4", 6 4 "8.0", -
trunk/composer.json
r61306 r61459 14 14 "ext-hash": "*", 15 15 "ext-json": "*", 16 "php": ">=7. 2.24"16 "php": ">=7.4" 17 17 }, 18 18 "suggest": { -
trunk/docker-compose.yml
r60926 r61459 80 80 - mysql:/var/lib/mysql 81 81 82 # For compatibility with PHP versions that don't support the caching_sha2_password auth plugin used in MySQL 8.0.83 command: ${LOCAL_DB_AUTH_OPTION-}84 85 82 healthcheck: 86 83 test: [ -
trunk/phpcompat.xml.dist
r61174 r61459 67 67 <rule ref="PHPCompatibilityWP"/> 68 68 69 <!-- WordPress Core currently supports PHP 7. 2+. -->70 <config name="testVersion" value="7. 2-"/>69 <!-- WordPress Core currently supports PHP 7.4+. --> 70 <config name="testVersion" value="7.4-"/> 71 71 72 72 <!-- -
trunk/src/readme.html
r61440 r61459 53 53 <h2>System Requirements</h2> 54 54 <ul> 55 <li><a href="https://www.php.net/">PHP</a> version <strong>7. 2.24</strong> or greater.</li>55 <li><a href="https://www.php.net/">PHP</a> version <strong>7.4</strong> or greater.</li> 56 56 <li><a href="https://www.mysql.com/">MySQL</a> version <strong>5.5.5</strong> or greater.</li> 57 57 </ul> -
trunk/src/wp-admin/includes/class-wp-site-health.php
r61444 r61459 966 966 'required' => false, 967 967 ), 968 // Sodium was introduced in PHP 7.2, but the extension may not be enabled. 968 969 'libsodium' => array( 969 970 'constant' => 'SODIUM_LIBRARY_VERSION', -
trunk/src/wp-admin/includes/misc.php
r61440 r61459 1622 1622 $response['is_lower_than_future_minimum'] = false; 1623 1623 1624 // The minimum supported PHP version will be updated to 7.4in the future. Check if the current version is lower.1625 if ( version_compare( $version, ' 7.4', '<' ) ) {1624 // The minimum supported PHP version will be updated to at least 8.0 in the future. Check if the current version is lower. 1625 if ( version_compare( $version, '8.0', '<' ) ) { 1626 1626 $response['is_lower_than_future_minimum'] = true; 1627 1627 -
trunk/src/wp-includes/compat.php
r61328 r61459 297 297 endif; 298 298 299 // sodium_crypto_box() was introduced in PHP 7.2.299 // sodium_crypto_box() was introduced with Sodium in PHP 7.2, but the extension may not be enabled. 300 300 if ( ! function_exists( 'sodium_crypto_box' ) ) { 301 301 require ABSPATH . WPINC . '/sodium_compat/autoload.php'; 302 }303 304 if ( ! function_exists( 'is_countable' ) ) {305 /**306 * Polyfill for is_countable() function added in PHP 7.3.307 *308 * Verify that the content of a variable is an array or an object309 * implementing the Countable interface.310 *311 * @since 4.9.6312 *313 * @param mixed $value The value to check.314 * @return bool True if `$value` is countable, false otherwise.315 */316 function is_countable( $value ) {317 return ( is_array( $value )318 || $value instanceof Countable319 || $value instanceof SimpleXMLElement320 || $value instanceof ResourceBundle321 );322 }323 }324 325 if ( ! function_exists( 'array_key_first' ) ) {326 /**327 * Polyfill for array_key_first() function added in PHP 7.3.328 *329 * Get the first key of the given array without affecting330 * the internal array pointer.331 *332 * @since 5.9.0333 *334 * @param array $array An array.335 * @return string|int|null The first key of array if the array336 * is not empty; `null` otherwise.337 */338 function array_key_first( array $array ) { // phpcs:ignore Universal.NamingConventions.NoReservedKeywordParameterNames.arrayFound339 if ( empty( $array ) ) {340 return null;341 }342 343 foreach ( $array as $key => $value ) {344 return $key;345 }346 }347 }348 349 if ( ! function_exists( 'array_key_last' ) ) {350 /**351 * Polyfill for `array_key_last()` function added in PHP 7.3.352 *353 * Get the last key of the given array without affecting the354 * internal array pointer.355 *356 * @since 5.9.0357 *358 * @param array $array An array.359 * @return string|int|null The last key of array if the array360 *. is not empty; `null` otherwise.361 */362 function array_key_last( array $array ) { // phpcs:ignore Universal.NamingConventions.NoReservedKeywordParameterNames.arrayFound363 if ( empty( $array ) ) {364 return null;365 }366 367 end( $array );368 369 return key( $array );370 }371 302 } 372 303 -
trunk/src/wp-includes/pluggable.php
r61457 r61459 2778 2778 * - `PASSWORD_DEFAULT` 2779 2779 * 2780 * The values of the algorithm constants are strings in PHP 7.4+ and integers in PHP 7.3 and earlier.2781 *2782 2780 * @since 6.8.0 2783 * 2784 * @param string|int $algorithm The hashing algorithm. Default is the value of the `PASSWORD_BCRYPT` constant. 2781 * @since 7.0.0 The `$algorithm` parameter is now always a string. 2782 * 2783 * @param string $algorithm The hashing algorithm. Default is the value of the `PASSWORD_BCRYPT` constant. 2785 2784 */ 2786 2785 $algorithm = apply_filters( 'wp_hash_password_algorithm', PASSWORD_BCRYPT ); … … 2792 2791 * filter. You must ensure that the options are appropriate for the algorithm in use. 2793 2792 * 2794 * The values of the algorithm constants are strings in PHP 7.4+ and integers in PHP 7.3 and earlier.2795 *2796 2793 * @since 6.8.0 2797 * 2798 * @param array $options Array of options to pass to the password hashing functions. 2799 * By default this is an empty array which means the default 2800 * options will be used. 2801 * @param string|int $algorithm The hashing algorithm in use. 2794 * @since 7.0.0 The `$algorithm` parameter is now always a string. 2795 * 2796 * @param array $options Array of options to pass to the password hashing functions. 2797 * By default this is an empty array which means the default 2798 * options will be used. 2799 * @param string $algorithm The hashing algorithm in use. 2802 2800 */ 2803 2801 $options = apply_filters( 'wp_hash_password_options', array(), $algorithm ); -
trunk/src/wp-includes/version.php
r61222 r61459 38 38 * @global string $required_php_version 39 39 */ 40 $required_php_version = '7. 2.24';40 $required_php_version = '7.4'; 41 41 42 42 /** -
trunk/tests/phpunit/includes/abstract-testcase.php
r61424 r61459 143 143 * Sets the bcrypt cost option for password hashing during tests. 144 144 * 145 * @param array $options The options for password hashing.146 * @param string |int $algorithm The algorithm to use for hashing. This is a string in PHP 7.4+ and an integer in PHP 7.3 and earlier.147 */ 148 public function wp_hash_password_options( array $options, $algorithm ): array {145 * @param array $options The options for password hashing. 146 * @param string $algorithm The algorithm to use for hashing. 147 */ 148 public function wp_hash_password_options( array $options, string $algorithm ): array { 149 149 if ( PASSWORD_BCRYPT === $algorithm ) { 150 150 $options['cost'] = 5; … … 1596 1596 } 1597 1597 1598 /*1599 * Compatibility check for PHP < 7.4, where array_merge() expects at least one array.1600 * See: https://3v4l.org/BIQMA1601 */1602 if ( array() === $matched_dirs ) {1603 return array();1604 }1605 1606 1598 return array_merge( ...$matched_dirs ); 1607 1599 } -
trunk/tests/phpunit/tests/admin/wpMediaListTable.php
r60729 r61459 123 123 * 124 124 * The warning that we should not see: 125 * PHP <=7.4: `Invalid argument supplied for foreach()`.125 * PHP 7.4: `Invalid argument supplied for foreach()`. 126 126 * PHP 8.0 and higher: `Warning: foreach() argument must be of type array|object, bool given`. 127 127 * -
trunk/tools/local-env/scripts/install.js
r60735 r61459 9 9 10 10 dotenvExpand.expand( dotenv.config() ); 11 12 // Determine if a non-default database authentication plugin needs to be used.13 local_env_utils.determine_auth_option();14 11 15 12 // Create wp-config.php. -
trunk/tools/local-env/scripts/start.js
r60308 r61459 15 15 16 16 const composeFiles = local_env_utils.get_compose_files(); 17 18 // Determine if a non-default database authentication plugin needs to be used.19 local_env_utils.determine_auth_option();20 17 21 18 // Check if the Docker service is running. -
trunk/tools/local-env/scripts/utils.js
r60308 r61459 11 11 * By default, only the standard docker-compose.yml file will be used. 12 12 * 13 * When PHP 7.2 or 7.3 is used in combination with MySQL 8.4, an override file will also be returned to ensure14 * that the mysql_native_password plugin authentication plugin is on and available for use.15 *16 13 * @return {string[]} Compose files. 17 14 */ … … 23 20 } 24 21 25 if ( process.env.LOCAL_DB_TYPE !== 'mysql' ) {26 return composeFiles;27 }28 29 if ( process.env.LOCAL_PHP !== '7.2-fpm' && process.env.LOCAL_PHP !== '7.3-fpm' ) {30 return composeFiles;31 }32 33 // PHP 7.2/7.3 in combination with MySQL 8.4 requires additional configuration to function properly.34 if ( process.env.LOCAL_DB_VERSION === '8.4' ) {35 composeFiles.push( 'tools/local-env/old-php-mysql-84.override.yml' );36 }37 38 22 return composeFiles; 39 },40 41 /**42 * Determines the option to pass for proper authentication plugin configuration given the specified PHP version,43 * database type, and database version.44 */45 determine_auth_option: function() {46 if ( process.env.LOCAL_DB_TYPE !== 'mysql' ) {47 return;48 }49 50 if ( process.env.LOCAL_PHP !== '7.2-fpm' && process.env.LOCAL_PHP !== '7.3-fpm' ) {51 return;52 }53 54 // MySQL 8.4 removed --default-authentication-plugin in favor of --authentication-policy.55 if ( process.env.LOCAL_DB_VERSION === '8.4' ) {56 process.env.LOCAL_DB_AUTH_OPTION = '--authentication-policy=mysql_native_password';57 } else {58 process.env.LOCAL_DB_AUTH_OPTION = '--default-authentication-plugin=mysql_native_password';59 }60 23 } 61 24 };
Note: See TracChangeset
for help on using the changeset viewer.