Skip to content

Commit d952352

Browse files
committed
General: Increase the minimum supported version of PHP to 7.2.24.
Props justlevine, masteradhoc, samiamnot, hellofromTonya, azaozz, jrf, dd32, desrosj, jorbin Fixes #58719 git-svn-id: https://develop.svn.wordpress.org/trunk@57985 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 0d730aa commit d952352

9 files changed

Lines changed: 21 additions & 39 deletions

File tree

‎.github/workflows/phpunit-tests.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
fail-fast: false
4646
matrix:
4747
os: [ ubuntu-latest ]
48-
php: [ '7.0', '7.1', '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' ]
4949
db-type: [ 'mysql' ]
5050
db-version: [ '5.7', '8.0', '8.1', '8.2', '8.3' ]
5151
multisite: [ false, true ]
@@ -97,7 +97,7 @@ jobs:
9797
fail-fast: false
9898
matrix:
9999
os: [ ubuntu-latest ]
100-
php: [ '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]
100+
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3' ]
101101
db-type: [ 'mariadb' ]
102102
db-version: [ '10.4', '10.6', '10.11', '11.2' ]
103103
multisite: [ false, true ]

‎.github/workflows/upgrade-testing.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
fail-fast: false
4444
matrix:
4545
os: [ 'ubuntu-latest' ]
46-
php: [ '7.0', '7.1', '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' ]
4747
db-type: [ 'mysql' ]
4848
db-version: [ '5.7', '8.0' ]
4949
wp: [ '6.0', '6.1', '6.2', '6.3', '6.4', '6.5' ]
@@ -66,7 +66,7 @@ jobs:
6666
fail-fast: false
6767
matrix:
6868
os: [ 'ubuntu-latest' ]
69-
php: [ '7.0', '7.1', '7.2', '7.3', '7.4' ]
69+
php: [ '7.2', '7.3', '7.4' ]
7070
db-type: [ 'mysql' ]
7171
db-version: [ '5.7', '8.0' ]
7272
wp: [ '5.0', '5.1', '5.2', '5.3', '5.4', '5.5', '5.6', '5.7', '5.8', '5.9' ]
@@ -116,7 +116,7 @@ jobs:
116116
fail-fast: false
117117
matrix:
118118
os: [ 'ubuntu-latest' ]
119-
php: [ '7.0', '7.1', '7.2', '7.3', '7.4' ]
119+
php: [ '7.2', '7.3', '7.4' ]
120120
db-type: [ 'mysql' ]
121121
db-version: [ '5.7', '8.0' ]
122122
wp: [ '4.1', '4.2', '4.3', '4.4', '4.5', '4.6', '4.7', '4.8', '4.9' ]

‎.version-support-php.json‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
{
2+
"6-6": [
3+
"7.2",
4+
"7.3",
5+
"7.4",
6+
"8.0",
7+
"8.1",
8+
"8.2",
9+
"8.3"
10+
],
211
"6-5": [
312
"7.0",
413
"7.1",

‎composer.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
"require": {
1313
"ext-json": "*",
14-
"php": ">=7.0"
14+
"php": ">=7.2.24"
1515
},
1616
"suggest": {
1717
"ext-dom": "*"

‎phpcompat.xml.dist‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@
6363

6464
<rule ref="PHPCompatibilityWP"/>
6565

66-
<!-- WordPress Core currently supports PHP 7.0+. -->
67-
<config name="testVersion" value="7.0-"/>
66+
<!-- WordPress Core currently supports PHP 7.2+. -->
67+
<config name="testVersion" value="7.2-"/>
6868

6969
<!--
7070
#############################################################################

‎src/readme.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ <h2>Migrating from other systems</h2>
5151

5252
<h2>System Requirements</h2>
5353
<ul>
54-
<li><a href="https://secure.php.net/">PHP</a> version <strong>7.0</strong> or greater.</li>
54+
<li><a href="https://secure.php.net/">PHP</a> version <strong>7.2.24</strong> or greater.</li>
5555
<li><a href="https://www.mysql.com/">MySQL</a> version <strong>5.5.5</strong> or greater.</li>
5656
</ul>
5757

‎src/wp-admin/includes/misc.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1647,8 +1647,8 @@ function wp_check_php_version() {
16471647

16481648
$response['is_lower_than_future_minimum'] = false;
16491649

1650-
// The minimum supported PHP version will be updated to 7.2. Check if the current version is lower.
1651-
if ( version_compare( $version, '7.2', '<' ) ) {
1650+
// The minimum supported PHP version will be updated to 7.4 in the future. Check if the current version is lower.
1651+
if ( version_compare( $version, '7.4', '<' ) ) {
16521652
$response['is_lower_than_future_minimum'] = true;
16531653

16541654
// Force showing of warnings.

‎src/wp-includes/compat.php‎

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -359,23 +359,6 @@ function is_countable( $value ) {
359359
}
360360
}
361361

362-
if ( ! function_exists( 'is_iterable' ) ) {
363-
/**
364-
* Polyfill for is_iterable() function added in PHP 7.1.
365-
*
366-
* Verify that the content of a variable is an array or an object
367-
* implementing the Traversable interface.
368-
*
369-
* @since 4.9.6
370-
*
371-
* @param mixed $value The value to check.
372-
* @return bool True if `$value` is iterable, false otherwise.
373-
*/
374-
function is_iterable( $value ) {
375-
return ( is_array( $value ) || $value instanceof Traversable );
376-
}
377-
}
378-
379362
if ( ! function_exists( 'array_key_first' ) ) {
380363
/**
381364
* Polyfill for array_key_first() function added in PHP 7.3.
@@ -520,16 +503,6 @@ function str_ends_with( $haystack, $needle ) {
520503
}
521504
}
522505

523-
// IMAGETYPE_WEBP constant is only defined in PHP 7.1 or later.
524-
if ( ! defined( 'IMAGETYPE_WEBP' ) ) {
525-
define( 'IMAGETYPE_WEBP', 18 );
526-
}
527-
528-
// IMG_WEBP constant is only defined in PHP 7.0.10 or later.
529-
if ( ! defined( 'IMG_WEBP' ) ) {
530-
define( 'IMG_WEBP', IMAGETYPE_WEBP );
531-
}
532-
533506
// IMAGETYPE_AVIF constant is only defined in PHP 8.x or later.
534507
if ( ! defined( 'IMAGETYPE_AVIF' ) ) {
535508
define( 'IMAGETYPE_AVIF', 19 );

‎src/wp-includes/version.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
*
3838
* @global string $required_php_version
3939
*/
40-
$required_php_version = '7.0.0';
40+
$required_php_version = '7.2.24';
4141

4242
/**
4343
* Holds the required MySQL version.

0 commit comments

Comments
 (0)