-
-
Notifications
You must be signed in to change notification settings - Fork 22
Closed as not planned
Description
Right now compat functions WordPress ships with, such as str_contains, are excluded from the stubs.
That means when a project's PHP version is < 8.0, PHPStan thinks the function does not exist and will report an error, even though WP actually provides this compat version
I can of course simply ignore the error in my config, but in my quick testing it seems like it should possible to include wp-includes/compat.php in the stubs, so that PHPStan will pick them up— as long as they are all still wrapped in function_exists() checks
Previously/related: #20 (though readonly is special because it's a syntax clash
Metadata
Metadata
Assignees
Labels
No labels