Skip to content

Commit

Permalink
General: Increase the minimum supported version of PHP to 7.2.24.
Browse files Browse the repository at this point in the history
Props justlevine, masteradhoc, samiamnot, hellofromTonya, azaozz, jrf, dd32, desrosj, jorbin

Fixes #58719

Built from https://develop.svn.wordpress.org/trunk@57985


git-svn-id: http://core.svn.wordpress.org/trunk@57471 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
johnbillion committed Apr 11, 2024
1 parent 181e799 commit dd22488
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 32 deletions.
2 changes: 1 addition & 1 deletion readme.html
Expand Up @@ -51,7 +51,7 @@ <h2>Migrating from other systems</h2>

<h2>System Requirements</h2>
<ul>
<li><a href="https://secure.php.net/">PHP</a> version <strong>7.0</strong> or greater.</li>
<li><a href="https://secure.php.net/">PHP</a> version <strong>7.2.24</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
4 changes: 2 additions & 2 deletions wp-admin/includes/misc.php
Expand Up @@ -1647,8 +1647,8 @@ function wp_check_php_version() {

$response['is_lower_than_future_minimum'] = false;

// The minimum supported PHP version will be updated to 7.2. Check if the current version is lower.
if ( version_compare( $version, '7.2', '<' ) ) {
// 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', '<' ) ) {
$response['is_lower_than_future_minimum'] = true;

// Force showing of warnings.
Expand Down
27 changes: 0 additions & 27 deletions wp-includes/compat.php
Expand Up @@ -359,23 +359,6 @@ function is_countable( $value ) {
}
}

if ( ! function_exists( 'is_iterable' ) ) {
/**
* Polyfill for is_iterable() function added in PHP 7.1.
*
* Verify that the content of a variable is an array or an object
* implementing the Traversable interface.
*
* @since 4.9.6
*
* @param mixed $value The value to check.
* @return bool True if `$value` is iterable, false otherwise.
*/
function is_iterable( $value ) {
return ( is_array( $value ) || $value instanceof Traversable );
}
}

if ( ! function_exists( 'array_key_first' ) ) {
/**
* Polyfill for array_key_first() function added in PHP 7.3.
Expand Down Expand Up @@ -520,16 +503,6 @@ function str_ends_with( $haystack, $needle ) {
}
}

// IMAGETYPE_WEBP constant is only defined in PHP 7.1 or later.
if ( ! defined( 'IMAGETYPE_WEBP' ) ) {
define( 'IMAGETYPE_WEBP', 18 );
}

// IMG_WEBP constant is only defined in PHP 7.0.10 or later.
if ( ! defined( 'IMG_WEBP' ) ) {
define( 'IMG_WEBP', IMAGETYPE_WEBP );
}

// IMAGETYPE_AVIF constant is only defined in PHP 8.x or later.
if ( ! defined( 'IMAGETYPE_AVIF' ) ) {
define( 'IMAGETYPE_AVIF', 19 );
Expand Down
4 changes: 2 additions & 2 deletions wp-includes/version.php
Expand Up @@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.6-alpha-57984';
$wp_version = '6.6-alpha-57985';

/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
Expand All @@ -37,7 +37,7 @@
*
* @global string $required_php_version
*/
$required_php_version = '7.0.0';
$required_php_version = '7.2.24';

/**
* Holds the required MySQL version.
Expand Down

0 comments on commit dd22488

Please sign in to comment.