-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHP8.1 "readonly" function #20
Comments
Hello @kkmuffme! All I have for you is as follows. sed -i -e 's#function readonly#function __readonly#' vendor/php-stubs/wordpress-stubs/wordpress-stubs.php |
Good news! All compat files are excluded. |
Thank you for opening this issue! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As of PHP 8.1 "readonly" is a reserved keyword.
WP has a "function readonly" (as of WP 5.9/trunk it will be moved to the php-compat file and renamed in the main file).
Problem however:
the "readonly" function will be there in WP 5.9 stubs still (since it's still in WP core, just in php-compat file).
if you run psalm (phpstan?) with phpVersion=8.1, this will however trigger multiple ParseError for the stubs
(e.g. Syntax error, unexpected ')' on line 98413)
The text was updated successfully, but these errors were encountered: