Skip to content

Commit fa2daf6

Browse files
authored
Merge pull request #29 from PHPCompatibility/feature/update-for-wp-5.8
Account for two new constant polyfills as added in WP 5.8
2 parents d396bce + 190ff5e commit fa2daf6

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

PHPCompatibilityWP/ruleset.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
* array_replace_recursive(): since WP 4.5.3 up to 5.2.x. The polyfill was removed in WP 5.3.
2727
* is_iterable(): since WP 4.9.6
2828
* is_countable(): since WP 4.9.6
29+
* IMAGETYPE_WEBP and IMG_WEBP: since WP 5.8.0.
2930
-->
3031
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.hash_hmacFound"/>
3132
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.json_encodeFound"/>
@@ -37,6 +38,8 @@
3738
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.array_replace_recursiveFound"/>
3839
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.is_iterableFound"/>
3940
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.is_countableFound"/>
41+
<exclude name="PHPCompatibility.Constants.NewConstants.imagetype_webpFound"/>
42+
<exclude name="PHPCompatibility.Constants.NewConstants.img_webpFound"/>
4043

4144
<!--
4245
Contained in /wp-includes/spl-autoload-compat.php.

Test/WPTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,5 @@ class ABC implements JsonSerializable {}
2424
$a = spl_autoload_functions();
2525

2626
$a = mysql_to_rfc3339();
27+
28+
echo IMAGETYPE_WEBP, IMG_WEBP;

0 commit comments

Comments
 (0)