Build/Test Tools: Update PHPCompatibilityWP to version 2.1.3.
The latest release takes the new polyfills added in WordPress 5.9 into account. This commit also removes redundant inline ignore comments for WP-polyfilled functionality. The PHPCompatibilityWP ruleset explicitly excludes those polyfills, so they don't need to be annotated as ignored. Release notes: https://github.com/PHPCompatibility/PHPCompatibilityWP/releases/tag/2.1.3 For a full list of changes in this update, see the PHPCompatibilityWP GitHub: https://github.com/PHPCompatibility/PHPCompatibilityWP/compare/2.1.2...2.1.3 Follow-up to [46290], [51543]. Props jrf. Fixes #54711. Built from https://develop.svn.wordpress.org/trunk@52425 git-svn-id: http://core.svn.wordpress.org/trunk@52017 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2e8ac63be2
commit
3ec2d2fcfa
|
@ -1384,7 +1384,6 @@ function verify_file_signature( $filename, $signatures, $filename_for_errors = f
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'php' => phpversion(),
|
'php' => phpversion(),
|
||||||
// phpcs:ignore PHPCompatibility.Constants.NewConstants.sodium_library_versionFound
|
|
||||||
'sodium' => defined( 'SODIUM_LIBRARY_VERSION' ) ? SODIUM_LIBRARY_VERSION : ( defined( 'ParagonIE_Sodium_Compat::VERSION_STRING' ) ? ParagonIE_Sodium_Compat::VERSION_STRING : false ),
|
'sodium' => defined( 'SODIUM_LIBRARY_VERSION' ) ? SODIUM_LIBRARY_VERSION : ( defined( 'ParagonIE_Sodium_Compat::VERSION_STRING' ) ? ParagonIE_Sodium_Compat::VERSION_STRING : false ),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
@ -1417,7 +1416,6 @@ function verify_file_signature( $filename, $signatures, $filename_for_errors = f
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'php' => phpversion(),
|
'php' => phpversion(),
|
||||||
// phpcs:ignore PHPCompatibility.Constants.NewConstants.sodium_library_versionFound
|
|
||||||
'sodium' => defined( 'SODIUM_LIBRARY_VERSION' ) ? SODIUM_LIBRARY_VERSION : ( defined( 'ParagonIE_Sodium_Compat::VERSION_STRING' ) ? ParagonIE_Sodium_Compat::VERSION_STRING : false ),
|
'sodium' => defined( 'SODIUM_LIBRARY_VERSION' ) ? SODIUM_LIBRARY_VERSION : ( defined( 'ParagonIE_Sodium_Compat::VERSION_STRING' ) ? ParagonIE_Sodium_Compat::VERSION_STRING : false ),
|
||||||
'polyfill_is_fast' => false,
|
'polyfill_is_fast' => false,
|
||||||
'max_execution_time' => ini_get( 'max_execution_time' ),
|
'max_execution_time' => ini_get( 'max_execution_time' ),
|
||||||
|
@ -1491,7 +1489,6 @@ function verify_file_signature( $filename, $signatures, $filename_for_errors = f
|
||||||
'skipped_key' => $skipped_key,
|
'skipped_key' => $skipped_key,
|
||||||
'skipped_sig' => $skipped_signature,
|
'skipped_sig' => $skipped_signature,
|
||||||
'php' => phpversion(),
|
'php' => phpversion(),
|
||||||
// phpcs:ignore PHPCompatibility.Constants.NewConstants.sodium_library_versionFound
|
|
||||||
'sodium' => defined( 'SODIUM_LIBRARY_VERSION' ) ? SODIUM_LIBRARY_VERSION : ( defined( 'ParagonIE_Sodium_Compat::VERSION_STRING' ) ? ParagonIE_Sodium_Compat::VERSION_STRING : false ),
|
'sodium' => defined( 'SODIUM_LIBRARY_VERSION' ) ? SODIUM_LIBRARY_VERSION : ( defined( 'ParagonIE_Sodium_Compat::VERSION_STRING' ) ? ParagonIE_Sodium_Compat::VERSION_STRING : false ),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
|
@ -947,7 +947,7 @@ function file_is_valid_image( $path ) {
|
||||||
* @return bool True if suitable, false if not suitable.
|
* @return bool True if suitable, false if not suitable.
|
||||||
*/
|
*/
|
||||||
function file_is_displayable_image( $path ) {
|
function file_is_displayable_image( $path ) {
|
||||||
$displayable_image_types = array( IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_PNG, IMAGETYPE_BMP, IMAGETYPE_ICO, IMAGETYPE_WEBP ); // phpcs:ignore PHPCompatibility.Constants.NewConstants.imagetype_webpFound
|
$displayable_image_types = array( IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_PNG, IMAGETYPE_BMP, IMAGETYPE_ICO, IMAGETYPE_WEBP );
|
||||||
|
|
||||||
$info = wp_getimagesize( $path );
|
$info = wp_getimagesize( $path );
|
||||||
if ( empty( $info ) ) {
|
if ( empty( $info ) ) {
|
||||||
|
|
|
@ -70,7 +70,7 @@ class WP_Image_Editor_GD extends WP_Image_Editor {
|
||||||
case 'image/gif':
|
case 'image/gif':
|
||||||
return ( $image_types & IMG_GIF ) != 0;
|
return ( $image_types & IMG_GIF ) != 0;
|
||||||
case 'image/webp':
|
case 'image/webp':
|
||||||
return ( $image_types & IMG_WEBP ) != 0; // phpcs:ignore PHPCompatibility.Constants.NewConstants.img_webpFound
|
return ( $image_types & IMG_WEBP ) != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -485,5 +485,5 @@ if ( ! defined( 'IMAGETYPE_WEBP' ) ) {
|
||||||
|
|
||||||
// IMG_WEBP constant is only defined in PHP 7.0.10 or later.
|
// IMG_WEBP constant is only defined in PHP 7.0.10 or later.
|
||||||
if ( ! defined( 'IMG_WEBP' ) ) {
|
if ( ! defined( 'IMG_WEBP' ) ) {
|
||||||
define( 'IMG_WEBP', IMAGETYPE_WEBP ); // phpcs:ignore PHPCompatibility.Constants.NewConstants.imagetype_webpFound
|
define( 'IMG_WEBP', IMAGETYPE_WEBP );
|
||||||
}
|
}
|
||||||
|
|
|
@ -3325,7 +3325,7 @@ function gd_edit_image_support($mime_type) {
|
||||||
case 'image/gif':
|
case 'image/gif':
|
||||||
return (imagetypes() & IMG_GIF) != 0;
|
return (imagetypes() & IMG_GIF) != 0;
|
||||||
case 'image/webp':
|
case 'image/webp':
|
||||||
return (imagetypes() & IMG_WEBP) != 0; // phpcs:ignore PHPCompatibility.Constants.NewConstants.img_webpFound
|
return (imagetypes() & IMG_WEBP) != 0;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
switch( $mime_type ) {
|
switch( $mime_type ) {
|
||||||
|
|
|
@ -5196,7 +5196,7 @@ function wp_getimagesize( $filename, array &$image_info = null ) {
|
||||||
return array(
|
return array(
|
||||||
$width,
|
$width,
|
||||||
$height,
|
$height,
|
||||||
IMAGETYPE_WEBP, // phpcs:ignore PHPCompatibility.Constants.NewConstants.imagetype_webpFound
|
IMAGETYPE_WEBP,
|
||||||
sprintf(
|
sprintf(
|
||||||
'width="%d" height="%d"',
|
'width="%d" height="%d"',
|
||||||
$width,
|
$width,
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.9-beta4-52424';
|
$wp_version = '5.9-beta4-52425';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue