From e913a6889a05cee5dab9a4eb2f3727029199076a Mon Sep 17 00:00:00 2001
From: jrfnl <jrfnl@users.noreply.github.com>
Date: Sun, 16 Aug 2020 03:50:28 +0200
Subject: [PATCH] PHP: Bump minimum version to 7.1.26
Reasoning for this specific version:
* 80% of 7.1 sites are on 7.1.26 or higher.
* PHP 7.1.26 has less than 20 known security vulnerabilities.
Sources:
* https://w3techs.com/technologies/details/pl-php/7.1
* https://www.cvedetails.com/version-list/74/128/2/PHP-PHP.html?sha=78e084dbc6897971bd02e634619a193e623904d6&order=1&trc=1128
---
composer.json | 2 +-
phpcompat.xml.dist | 4 ++--
src/readme.html | 2 +-
src/wp-admin/includes/class-wp-site-health.php | 4 ++--
src/wp-includes/version.php | 2 +-
5 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/composer.json b/composer.json
index 58e456582c..4f01abad0a 100644
a
|
b
|
|
10 | 10 | "issues": "https://core.trac.wordpress.org/" |
11 | 11 | }, |
12 | 12 | "require": { |
13 | | "php": ">=5.6" |
| 13 | "php": ">=7.1" |
14 | 14 | }, |
15 | 15 | "require-dev": { |
16 | 16 | "dealerdirect/phpcodesniffer-composer-installer": "~0.6.0", |
diff --git a/phpcompat.xml.dist b/phpcompat.xml.dist
index 5af8e2a503..86d417fc34 100644
a
|
b
|
|
4 | 4 | |
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.1+. --> |
| 8 | <config name="testVersion" value="7.1-"/> |
9 | 9 | |
10 | 10 | <!-- Only scan PHP files. --> |
11 | 11 | <arg name="extensions" value="php"/> |
diff --git a/src/readme.html b/src/readme.html
index 15c71763a2..ad51d5ff2b 100644
a
|
b
|
|
51 | 51 | |
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 higher.</li> |
| 54 | <li><a href="https://secure.php.net/">PHP</a> version <strong>7.1.26</strong> or higher.</li> |
55 | 55 | <li><a href="https://www.mysql.com/">MySQL</a> version <strong>5.0</strong> or higher.</li> |
56 | 56 | </ul> |
57 | 57 | |
diff --git a/src/wp-admin/includes/class-wp-site-health.php b/src/wp-admin/includes/class-wp-site-health.php
index 2fd570318d..887b8e1c0b 100644
a
|
b
|
class WP_Site_Health { |
2359 | 2359 | ), |
2360 | 2360 | 'banners_rtl' => array(), |
2361 | 2361 | 'tested' => '5.5.0', |
2362 | | 'requires_php' => '5.6.20', |
| 2362 | 'requires_php' => '7.1.26', |
2363 | 2363 | 'compatibility' => new stdClass(), |
2364 | 2364 | ); |
2365 | 2365 | |
… |
… |
class WP_Site_Health { |
2369 | 2369 | 'url' => 'https://wordpress.org/themes/a-fake-theme/', |
2370 | 2370 | 'package' => 'https://downloads.wordpress.org/theme/a-fake-theme.9.9.zip', |
2371 | 2371 | 'requires' => '5.0.0', |
2372 | | 'requires_php' => '5.6.20', |
| 2372 | 'requires_php' => '7.1.26', |
2373 | 2373 | ); |
2374 | 2374 | |
2375 | 2375 | $type = 'plugin'; |
diff --git a/src/wp-includes/version.php b/src/wp-includes/version.php
index e00f5b1b11..4e703f044d 100644
a
|
b
|
$tinymce_version = '49100-20200624'; |
34 | 34 | * |
35 | 35 | * @global string $required_php_version |
36 | 36 | */ |
37 | | $required_php_version = '5.6.20'; |
| 37 | $required_php_version = '7.1.26'; |
38 | 38 | |
39 | 39 | /** |
40 | 40 | * Holds the required MySQL version. |