Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/install-testing.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Confirms that installing WordPress using WP-CLI works successfully.
#
# This workflow is not meant to test wordpress-develop checkouts, but rather tagged versions officially available on WordPress.org.
#
# This workflow is triggered for all WordPress versions that are currently receiving security updates. It therefore needs to
# retain support for older PHP and database versions.
name: Installation Tests

on:
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/local-docker-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,6 @@ jobs:
- db-version: '9.1'
- db-version: '9.2'
- db-version: '9.3'
# MySQL 9.0+ will not work on PHP 7.2 & 7.3. See https://core.trac.wordpress.org/ticket/61218.
- php: '7.2'
db-version: '9.4'
- php: '7.3'
db-version: '9.4'
# No PHP 8.5 + Memcached support yet.
- php: '8.5'
memcached: true
Expand Down
71 changes: 5 additions & 66 deletions .github/workflows/phpunit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
matrix:
event: ['${{ github.event_name }}']
os: [ ubuntu-24.04 ]
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ]
php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ]
db-type: [ 'mysql' ]
db-version: [ '5.7', '8.0', '8.4' ]
tests-domain: [ 'example.org' ]
Expand All @@ -83,18 +83,6 @@ jobs:
exclude:
# Trim the matrix on Pull Requests to reduce the number of concurrent jobs.
# Each PHP version is tested againgst one version of MySQL.
- event: pull_request
php: '7.2'
db-version: '8.0'
- event: pull_request
php: '7.2'
db-version: '8.4'
- event: pull_request
php: '7.3'
db-version: '5.7'
- event: pull_request
php: '7.3'
db-version: '8.4'
- event: pull_request
php: '7.4'
db-version: '5.7'
Expand Down Expand Up @@ -209,7 +197,7 @@ jobs:
matrix:
event: ['${{ github.event_name }}']
os: [ ubuntu-24.04 ]
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ]
php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ]
db-type: [ 'mariadb' ]
db-version: [ '5.5', '10.3', '10.4', '10.5', '10.6', '10.11', '11.4', '11.8' ]
multisite: [ false, true ]
Expand All @@ -219,48 +207,6 @@ jobs:
# Trim the matrix on Pull Requests to reduce the number of concurrent jobs.
# Each PHP version is tested against one version of MariaDB.
# Each MariaDB version is tested at least once.
- event: pull_request
php: '7.2'
db-version: '10.3'
- event: pull_request
php: '7.2'
db-version: '10.4'
- event: pull_request
php: '7.2'
db-version: '10.5'
- event: pull_request
php: '7.2'
db-version: '10.6'
- event: pull_request
php: '7.2'
db-version: '10.11'
- event: pull_request
php: '7.2'
db-version: '11.4'
- event: pull_request
php: '7.2'
db-version: '11.8'
- event: pull_request
php: '7.3'
db-version: '5.5'
- event: pull_request
php: '7.3'
db-version: '10.4'
- event: pull_request
php: '7.3'
db-version: '10.5'
- event: pull_request
php: '7.3'
db-version: '10.6'
- event: pull_request
php: '7.3'
db-version: '10.11'
- event: pull_request
php: '7.3'
db-version: '11.4'
- event: pull_request
php: '7.3'
db-version: '11.8'
- event: pull_request
php: '7.4'
db-version: '5.5'
Expand Down Expand Up @@ -456,27 +402,20 @@ jobs:
matrix:
event: ['${{ github.event_name }}']
os: [ ubuntu-24.04 ]
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ]
php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ]
db-type: [ 'mysql', 'mariadb' ]
db-version: [ '9.4', '12.0' ]
multisite: [ false, true ]
memcached: [ false ]
db-innovation: [ true ]

exclude:
# MySQL 9.0+ will not work on PHP <= 7.3 because mysql_native_password was removed. See https://core.trac.wordpress.org/ticket/61218.
- php: '7.2'
db-version: '9.4'
- php: '7.3'
db-version: '9.4'
# Exclude version combinations that don't exist.
- db-type: 'mariadb'
db-version: '9.4'
- db-type: 'mysql'
db-version: '12.0'
# On Pull requests, only test each innovation release once.
- event: pull_request
php: '7.3'
- event: pull_request
php: '7.4'
- event: pull_request
Expand Down Expand Up @@ -521,7 +460,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ '7.2', '7.4', '8.0', '8.4' ]
php: [ '7.4', '8.0', '8.4' ]
db-type: [ 'mysql' ]
db-version: [ '8.4' ]
phpunit-test-groups: [ 'html-api-html5lib-tests' ]
Expand Down Expand Up @@ -550,7 +489,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [ '7.2', '8.4' ]
php: [ '7.4', '8.4' ]
db-version: [ '8.4', '11.8' ]
db-type: [ 'mysql', 'mariadb' ]
multisite: [ false ]
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/reusable-upgrade-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ jobs:
--health-retries="5"
-e MYSQL_ROOT_PASSWORD="root"
-e MYSQL_DATABASE="test_db"
--entrypoint sh ${{ inputs.db-type }}:${{ inputs.db-version }}
-c "exec docker-entrypoint.sh mysqld${{ inputs.db-type == 'mysql' && contains( fromJSON('["7.2", "7.3"]'), inputs.php ) && ' --default-authentication-plugin=mysql_native_password' || '' }}"

steps:
- name: Set up PHP ${{ inputs.php }}
Expand Down
14 changes: 3 additions & 11 deletions .github/workflows/upgrade-develop-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,12 @@ jobs:
fail-fast: false
matrix:
os: [ 'ubuntu-24.04' ]
php: [ '7.2', '8.4' ]
php: [ '7.4', '8.4' ]
db-type: [ 'mysql' ]
db-version: [ '5.7', '8.4' ]
# WordPress 4.9 is the oldest version that supports PHP 7.2.
wp: [ '4.9', '6.6', '6.7', '6.8' ]
# WordPress 5.3 is the oldest version that supports PHP 7.4.
wp: [ '5.3', '6.6', '6.7', '6.8' ]
multisite: [ false, true ]

exclude:
# 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.
- php: '7.2'
db-version: '8.4'
# WordPress 4.9 does not support PHP 8.4.
- php: '8.4'
wp: '4.9'
with:
os: ${{ matrix.os }}
php: ${{ matrix.php }}
Expand Down
44 changes: 5 additions & 39 deletions .github/workflows/upgrade-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,23 +68,11 @@ jobs:
fail-fast: false
matrix:
os: [ 'ubuntu-24.04' ]
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ]
php: [ '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5' ]
db-type: [ 'mysql' ]
db-version: [ '5.7', '8.0', '8.4', '9.4' ]
wp: [ '6.7', '6.8' ]
multisite: [ false, true ]

exclude:
# 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.
- php: '7.2'
db-version: '8.4'
- php: '7.3'
db-version: '8.4'
# MySQL 9.0+ will not work on PHP 7.2 & 7.3. See https://core.trac.wordpress.org/ticket/61218.
- php: '7.2'
db-version: '9.4'
- php: '7.3'
db-version: '9.4'
with:
os: ${{ matrix.os }}
php: ${{ matrix.php }}
Expand All @@ -105,16 +93,11 @@ jobs:
fail-fast: false
matrix:
os: [ 'ubuntu-24.04' ]
php: [ '7.2', '7.4', '8.0', '8.4' ]
php: [ '7.4', '8.0', '8.4' ]
db-type: [ 'mysql' ]
db-version: [ '5.7', '8.4' ]
wp: [ '6.0', '6.3', '6.4', '6.5' ]
multisite: [ false, true ]

exclude:
# 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.
- php: '7.2'
db-version: '8.4'
with:
os: ${{ matrix.os }}
php: ${{ matrix.php }}
Expand All @@ -124,7 +107,7 @@ jobs:
new-version: ${{ inputs.new-version && inputs.new-version || 'latest' }}
multisite: ${{ matrix.multisite }}

# Tests 5.x releases where the WordPress database version changed on the oldest and newest supported versions of PHP 7.
# Tests 5.x releases where the WordPress database version changed on the only supported version of PHP 7.
upgrade-tests-wp-5x-php-7x-mysql:
name: ${{ matrix.wp }} to ${{ inputs.new-version && inputs.new-version || 'latest' }}
uses: ./.github/workflows/reusable-upgrade-testing.yml
Expand All @@ -135,16 +118,11 @@ jobs:
fail-fast: false
matrix:
os: [ 'ubuntu-24.04' ]
php: [ '7.2', '7.4' ]
php: [ '7.4' ]
db-type: [ 'mysql' ]
db-version: [ '5.7', '8.4' ]
wp: [ '5.0', '5.1', '5.3', '5.4', '5.5', '5.6', '5.9' ]
multisite: [ false, true ]

exclude:
# 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.
- php: '7.2'
db-version: '8.4'
with:
os: ${{ matrix.os }}
php: ${{ matrix.php }}
Expand Down Expand Up @@ -199,23 +177,11 @@ jobs:
fail-fast: false
matrix:
os: [ 'ubuntu-24.04' ]
php: [ '7.2', '7.3', '7.4' ]
php: [ '7.4' ]
db-type: [ 'mysql' ]
db-version: [ '5.7', '8.0', '8.4', '9.4' ]
wp: [ '4.7' ]
multisite: [ false, true ]

exclude:
# 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.
- php: '7.2'
db-version: '8.4'
- php: '7.3'
db-version: '8.4'
# MySQL 9.0+ will not work on PHP 7.2 & 7.3. See https://core.trac.wordpress.org/ticket/61218.
- php: '7.2'
db-version: '9.4'
- php: '7.3'
db-version: '9.4'
with:
os: ${{ matrix.os }}
php: ${{ matrix.php }}
Expand Down
9 changes: 9 additions & 0 deletions .version-support-php.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
{
"7-0": [
"7.4",
"8.0",
"8.1",
"8.2",
"8.3",
"8.4",
"8.5"
],
"6-9": [
"7.2",
"7.3",
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"require": {
"ext-hash": "*",
"ext-json": "*",
"php": ">=7.2.24"
"php": ">=7.4"
},
"suggest": {
"ext-dom": "*"
Expand Down
3 changes: 0 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@ services:
- ./tools/local-env/mysql-init.sql:/docker-entrypoint-initdb.d/mysql-init.sql
- mysql:/var/lib/mysql

# For compatibility with PHP versions that don't support the caching_sha2_password auth plugin used in MySQL 8.0.
command: ${LOCAL_DB_AUTH_OPTION-}

healthcheck:
test: [
'CMD-SHELL',
Expand Down
4 changes: 2 additions & 2 deletions phpcompat.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@

<rule ref="PHPCompatibilityWP"/>

<!-- WordPress Core currently supports PHP 7.2+. -->
<config name="testVersion" value="7.2-"/>
<!-- WordPress Core currently supports PHP 7.4+. -->
<config name="testVersion" value="7.4-"/>

<!--
#############################################################################
Expand Down
2 changes: 1 addition & 1 deletion src/readme.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ <h2>Migrating from other systems</h2>

<h2>System Requirements</h2>
<ul>
<li><a href="https://www.php.net/">PHP</a> version <strong>7.2.24</strong> or greater.</li>
<li><a href="https://www.php.net/">PHP</a> version <strong>7.4</strong> or greater.</li>
<li><a href="https://www.mysql.com/">MySQL</a> version <strong>5.5.5</strong> or greater.</li>
</ul>

Expand Down
1 change: 1 addition & 0 deletions src/wp-admin/includes/class-wp-site-health.php
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,7 @@ public function get_test_php_extensions() {
'function' => 'mysqli_connect',
'required' => false,
),
// Sodium was introduced in PHP 7.2, but the extension may not be enabled.
'libsodium' => array(
'constant' => 'SODIUM_LIBRARY_VERSION',
'required' => false,
Expand Down
4 changes: 2 additions & 2 deletions src/wp-admin/includes/misc.php
Original file line number Diff line number Diff line change
Expand Up @@ -1621,8 +1621,8 @@ function wp_check_php_version() {

$response['is_lower_than_future_minimum'] = false;

// The minimum supported PHP version will be updated to 7.4 in the future. Check if the current version is lower.
if ( version_compare( $version, '7.4', '<' ) ) {
// The minimum supported PHP version will be updated to at least 8.0 in the future. Check if the current version is lower.
if ( version_compare( $version, '8.0', '<' ) ) {
$response['is_lower_than_future_minimum'] = true;

// Force showing of warnings.
Expand Down
Loading
Loading