Skip to content

Commit

Permalink
Account for two new constant polyfills as added in WP 5.8
Browse files Browse the repository at this point in the history
  • Loading branch information
jrfnl committed Jun 21, 2021
1 parent d396bce commit 190ff5e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions PHPCompatibilityWP/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
* array_replace_recursive(): since WP 4.5.3 up to 5.2.x. The polyfill was removed in WP 5.3.
* is_iterable(): since WP 4.9.6
* is_countable(): since WP 4.9.6
* IMAGETYPE_WEBP and IMG_WEBP: since WP 5.8.0.
-->
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.hash_hmacFound"/>
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.json_encodeFound"/>
Expand All @@ -37,6 +38,8 @@
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.array_replace_recursiveFound"/>
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.is_iterableFound"/>
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.is_countableFound"/>
<exclude name="PHPCompatibility.Constants.NewConstants.imagetype_webpFound"/>
<exclude name="PHPCompatibility.Constants.NewConstants.img_webpFound"/>

<!--
Contained in /wp-includes/spl-autoload-compat.php.
Expand Down
2 changes: 2 additions & 0 deletions Test/WPTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ class ABC implements JsonSerializable {}
$a = spl_autoload_functions();

$a = mysql_to_rfc3339();

echo IMAGETYPE_WEBP, IMG_WEBP;

0 comments on commit 190ff5e

Please sign in to comment.