Skip to content

Commit 6904657

Browse files
committed
WP 6.5: account for new function polyfills
WP 6.5 contains a polyfill for `array_is_list`, which was introduced in PHP 8.1
1 parent 02e4bf7 commit 6904657

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

PHPCompatibilityWP/ruleset.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
* str_contains(): since WP 5.9.0
3434
* str_starts_with(): since WP 5.9.0
3535
* str_ends_with(): since WP 5.9.0
36+
* array_is_list(): since WP 6.5.0
3637
-->
3738
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.hash_hmacFound"/>
3839
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.json_encodeFound"/>
@@ -51,6 +52,7 @@
5152
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.str_containsFound"/>
5253
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.str_starts_withFound"/>
5354
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.str_ends_withFound"/>
55+
<exclude name="PHPCompatibility.FunctionUse.NewFunctions.array_is_listFound"/>
5456

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

3535
echo IMAGETYPE_WEBP, IMG_WEBP;
36+
37+
if (array_is_list($array)) {}

0 commit comments

Comments
 (0)