Make WordPress Core

Changeset 52425


Ignore:
Timestamp:
12/31/2021 01:53:19 PM (4 years ago)
Author:
SergeyBiryukov
Message:

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.

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/composer.json

    r52412 r52425  
    1717        "squizlabs/php_codesniffer": "3.6.0",
    1818        "wp-coding-standards/wpcs": "~2.3.0",
    19         "phpcompatibility/phpcompatibility-wp": "~2.1.2",
     19        "phpcompatibility/phpcompatibility-wp": "~2.1.3",
    2020        "yoast/phpunit-polyfills": "^1.0.1"
    2121    },
  • trunk/src/wp-admin/includes/file.php

    r52406 r52425  
    13851385            array(
    13861386                'php'    => phpversion(),
    1387                 // phpcs:ignore PHPCompatibility.Constants.NewConstants.sodium_library_versionFound
    13881387                'sodium' => defined( 'SODIUM_LIBRARY_VERSION' ) ? SODIUM_LIBRARY_VERSION : ( defined( 'ParagonIE_Sodium_Compat::VERSION_STRING' ) ? ParagonIE_Sodium_Compat::VERSION_STRING : false ),
    13891388            )
     
    14181417                array(
    14191418                    'php'                => phpversion(),
    1420                     // phpcs:ignore PHPCompatibility.Constants.NewConstants.sodium_library_versionFound
    14211419                    'sodium'             => defined( 'SODIUM_LIBRARY_VERSION' ) ? SODIUM_LIBRARY_VERSION : ( defined( 'ParagonIE_Sodium_Compat::VERSION_STRING' ) ? ParagonIE_Sodium_Compat::VERSION_STRING : false ),
    14221420                    'polyfill_is_fast'   => false,
     
    14921490            'skipped_sig' => $skipped_signature,
    14931491            'php'         => phpversion(),
    1494             // phpcs:ignore PHPCompatibility.Constants.NewConstants.sodium_library_versionFound
    14951492            'sodium'      => defined( 'SODIUM_LIBRARY_VERSION' ) ? SODIUM_LIBRARY_VERSION : ( defined( 'ParagonIE_Sodium_Compat::VERSION_STRING' ) ? ParagonIE_Sodium_Compat::VERSION_STRING : false ),
    14961493        )
  • trunk/src/wp-admin/includes/image.php

    r52357 r52425  
    948948 */
    949949function file_is_displayable_image( $path ) {
    950     $displayable_image_types = array( IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_PNG, IMAGETYPE_BMP, IMAGETYPE_ICO, IMAGETYPE_WEBP ); // phpcs:ignore PHPCompatibility.Constants.NewConstants.imagetype_webpFound
     950    $displayable_image_types = array( IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_PNG, IMAGETYPE_BMP, IMAGETYPE_ICO, IMAGETYPE_WEBP );
    951951
    952952    $info = wp_getimagesize( $path );
  • trunk/src/wp-includes/class-wp-image-editor-gd.php

    r51790 r52425  
    7171                return ( $image_types & IMG_GIF ) != 0;
    7272            case 'image/webp':
    73                 return ( $image_types & IMG_WEBP ) != 0; // phpcs:ignore PHPCompatibility.Constants.NewConstants.img_webpFound
     73                return ( $image_types & IMG_WEBP ) != 0;
    7474        }
    7575
  • trunk/src/wp-includes/compat.php

    r52040 r52425  
    486486// IMG_WEBP constant is only defined in PHP 7.0.10 or later.
    487487if ( ! defined( 'IMG_WEBP' ) ) {
    488     define( 'IMG_WEBP', IMAGETYPE_WEBP ); // phpcs:ignore PHPCompatibility.Constants.NewConstants.imagetype_webpFound
    489 }
     488    define( 'IMG_WEBP', IMAGETYPE_WEBP );
     489}
  • trunk/src/wp-includes/deprecated.php

    r51597 r52425  
    33263326                return (imagetypes() & IMG_GIF) != 0;
    33273327            case 'image/webp':
    3328                 return (imagetypes() & IMG_WEBP) != 0; // phpcs:ignore PHPCompatibility.Constants.NewConstants.img_webpFound
     3328                return (imagetypes() & IMG_WEBP) != 0;
    33293329        }
    33303330    } else {
  • trunk/src/wp-includes/media.php

    r52332 r52425  
    51975197                $width,
    51985198                $height,
    5199                 IMAGETYPE_WEBP, // phpcs:ignore PHPCompatibility.Constants.NewConstants.imagetype_webpFound
     5199                IMAGETYPE_WEBP,
    52005200                sprintf(
    52015201                    'width="%d" height="%d"',
Note: See TracChangeset for help on using the changeset viewer.