Commit cff118c
committed
WP 5.9: account for new function polyfills
WP 5.9 contains polyfills for five new PHP native functions:
* `array_key_first()` and `array_key_last()`, which were both introduced in PHP 7.3.
* `str_contains()`, `str_starts_with()` and `str_ends_with()`, which were introduced in PHP 8.0.
While the PHP 8.0 functions are not yet flagged by the latest release of PHPCompatibility, they will be once PHPCompatibility 10.0 comes out.
As `exclude`-ing error codes which don't exist yet does not lead to errors in PHPCS, we may as well add the exclusions for all WP 5.9 polyfills in one go.
Refs:
* https://core.trac.wordpress.org/changeset/52038
* https://core.trac.wordpress.org/changeset/52039
* https://core.trac.wordpress.org/changeset/52040
* https://core.trac.wordpress.org/browser/trunk/src/wp-includes/compat.php#L398-L4791 parent 80cb451 commit cff118c
2 files changed
+17
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
30 | 35 | | |
31 | 36 | | |
32 | 37 | | |
| |||
40 | 45 | | |
41 | 46 | | |
42 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
43 | 53 | | |
44 | 54 | | |
45 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
28 | 35 | | |
0 commit comments