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.

git-svn-id: https://develop.svn.wordpress.org/trunk@52425 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2021-12-31 13:53:19 +00:00
parent c1b78cc2dd
commit a1abc11ce6
7 changed files with 6 additions and 9 deletions
+1 -1
View File
@@ -70,7 +70,7 @@ class WP_Image_Editor_GD extends WP_Image_Editor {
case 'image/gif':
return ( $image_types & IMG_GIF ) != 0;
case 'image/webp':
return ( $image_types & IMG_WEBP ) != 0; // phpcs:ignore PHPCompatibility.Constants.NewConstants.img_webpFound
return ( $image_types & IMG_WEBP ) != 0;
}
return false;
+1 -1
View File
@@ -485,5 +485,5 @@ if ( ! defined( 'IMAGETYPE_WEBP' ) ) {
// IMG_WEBP constant is only defined in PHP 7.0.10 or later.
if ( ! defined( 'IMG_WEBP' ) ) {
define( 'IMG_WEBP', IMAGETYPE_WEBP ); // phpcs:ignore PHPCompatibility.Constants.NewConstants.imagetype_webpFound
define( 'IMG_WEBP', IMAGETYPE_WEBP );
}
+1 -1
View File
@@ -3325,7 +3325,7 @@ function gd_edit_image_support($mime_type) {
case 'image/gif':
return (imagetypes() & IMG_GIF) != 0;
case 'image/webp':
return (imagetypes() & IMG_WEBP) != 0; // phpcs:ignore PHPCompatibility.Constants.NewConstants.img_webpFound
return (imagetypes() & IMG_WEBP) != 0;
}
} else {
switch( $mime_type ) {
+1 -1
View File
@@ -5196,7 +5196,7 @@ function wp_getimagesize( $filename, array &$image_info = null ) {
return array(
$width,
$height,
IMAGETYPE_WEBP, // phpcs:ignore PHPCompatibility.Constants.NewConstants.imagetype_webpFound
IMAGETYPE_WEBP,
sprintf(
'width="%d" height="%d"',
$width,