-
-
Notifications
You must be signed in to change notification settings - Fork 896
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
mixed type is not reported on PHP 7.4 #6861
Comments
This will be solved in PHPStan 2.0 being released at some point in 2024, thanks to upgrade to nikic/php-parser 5.0. From the upgrade guide:
Work in progress: phpstan/phpstan-src#2839 Result diff of your code snippet: @@ @@
-No errors
+PHP 8.0 – 8.1
+==========
+
+No errors
+
+PHP 7.1 – 7.4 (2 errors)
+==========
+
+ 9: Property Args\register_meta::$default has unknown class Args\mixed as its type.
+13: Property Args\register_meta::$default (Args\mixed) does not accept int. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Closes phpstan/phpstan#6861 Closes phpstan/phpstan#5629
Bug report
mixed
type was introduced in PHP 8.0.I cannot set PHP version in playground.
Code snippet that reproduces the problem
https://phpstan.org/r/f561d4fe-243a-4df0-9f8d-6b26c99cff8b
Expected output
An error that
Args\mixed
is missing.When run on PHP 7.4:
The text was updated successfully, but these errors were encountered: