WordPress.org

Make WordPress Core

Ticket #51043: 51043-php-version-bump.patch

File 51043-php-version-bump.patch, 3.3 KB (added by jrf, 16 months ago)

This patch bumps the minimum PHP version to PHP 7.1.26. The Travis and test run changes will be addressed in #46149

  • composer.json

    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  
    1010                "issues": "https://core.trac.wordpress.org/"
    1111        },
    1212        "require": {
    13                 "php": ">=5.6"
     13                "php": ">=7.1"
    1414        },
    1515        "require-dev": {
    1616                "dealerdirect/phpcodesniffer-composer-installer": "~0.6.0",
  • phpcompat.xml.dist

    diff --git a/phpcompat.xml.dist b/phpcompat.xml.dist
    index 5af8e2a503..86d417fc34 100644
    a b  
    44
    55        <rule ref="PHPCompatibilityWP"/>
    66
    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-"/>
    99
    1010        <!-- Only scan PHP files. -->
    1111        <arg name="extensions" value="php"/>
  • src/readme.html

    diff --git a/src/readme.html b/src/readme.html
    index 15c71763a2..ad51d5ff2b 100644
    a b  
    5151
    5252<h2>System Requirements</h2>
    5353<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>
    5555        <li><a href="https://www.mysql.com/">MySQL</a> version <strong>5.0</strong> or higher.</li>
    5656</ul>
    5757
  • src/wp-admin/includes/class-wp-site-health.php

    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 { 
    23592359                        ),
    23602360                        'banners_rtl'   => array(),
    23612361                        'tested'        => '5.5.0',
    2362                         'requires_php'  => '5.6.20',
     2362                        'requires_php'  => '7.1.26',
    23632363                        'compatibility' => new stdClass(),
    23642364                );
    23652365
    class WP_Site_Health { 
    23692369                        'url'          => 'https://wordpress.org/themes/a-fake-theme/',
    23702370                        'package'      => 'https://downloads.wordpress.org/theme/a-fake-theme.9.9.zip',
    23712371                        'requires'     => '5.0.0',
    2372                         'requires_php' => '5.6.20',
     2372                        'requires_php' => '7.1.26',
    23732373                );
    23742374
    23752375                $type = 'plugin';
  • src/wp-includes/version.php

    diff --git a/src/wp-includes/version.php b/src/wp-includes/version.php
    index e00f5b1b11..4e703f044d 100644
    a b $tinymce_version = '49100-20200624'; 
    3434 *
    3535 * @global string $required_php_version
    3636 */
    37 $required_php_version = '5.6.20';
     37$required_php_version = '7.1.26';
    3838
    3939/**
    4040 * Holds the required MySQL version.