-
-
Notifications
You must be signed in to change notification settings - Fork 863
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
Wrong type assumptions #5172
Labels
Milestone
Comments
@jrmajor After the latest commit in dev-master, PHPStan now reports different result with your code snippet: @@ @@
-12: Dumped type: mixed
-13: Dumped type: mixed
-21: Dumped type: mixed~null
-22: Dumped type: mixed~null
-24: Using nullsafe property access on non-nullable type mixed. Use -> instead.
+-1: Internal error: PHPStan\Rules\Methods\WrongCaseOfInheritedMethodRule::findMethod(): Argument #2 ($classReflection) must be of type PHPStan\Reflection\ClassReflection, null given, called in /var/task/vendor/phpstan/phpstan-strict-rules/src/Rules/Methods/WrongCaseOfInheritedMethodRule.php on line 40
+Run PHPStan with --debug option and post the stack trace to:
+https://github.com/phpstan/phpstan/issues/new?template=Bug_report.md Full report
|
Fixed: phpstan/phpstan-src#2577 |
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. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Bug report
Code snippet that reproduces the problem
https://phpstan.org/r/c9afcc1a-1d8b-48d6-aaf8-8ae3dead2e03
Expected output
Dumped type in lines 21/22 is
mixed~null
, which is a wrong assumption (in case I pointed out in a comment).Also, the message
Using nullsafe property access on non-nullable type mixed. Use -> instead.
makes no sense, because mixed is a nullable type.Did PHPStan help you today? Did it make you happy in any way?
PHPStan makes me happier every day!
The text was updated successfully, but these errors were encountered: