Skip to content

Commit

Permalink
Merge pull request #55 from swissspidy/add/wp65-polyfills
Browse files Browse the repository at this point in the history
WP 6.5: account for new function polyfills
  • Loading branch information
jrfnl authored Apr 24, 2024
2 parents cd655a3 + 6904657 commit 27ae51f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions PHPCompatibilityWP/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
* str_contains(): since WP 5.9.0
* str_starts_with(): since WP 5.9.0
* str_ends_with(): since WP 5.9.0
* array_is_list(): since WP 6.5.0
-->
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.hash_hmacFound"/>
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.json_encodeFound"/>
Expand All @@ -51,6 +52,7 @@
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.str_containsFound"/>
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.str_starts_withFound"/>
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.str_ends_withFound"/>
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.array_is_listFound"/>

<!--
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 @@ -33,3 +33,5 @@ class ABC implements JsonSerializable {}
$a = str_ends_with( $haystack, $needle );

echo IMAGETYPE_WEBP, IMG_WEBP;

if (array_is_list($array)) {}

0 comments on commit 27ae51f

Please sign in to comment.