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
Assigning generic objects without constructor to nullable properties reports false positives #4526
Labels
Milestone
Comments
@dktapps After the latest commit in dev-master, PHPStan now reports different result with your code snippet: @@ @@
+10: Property HelloWorld::$map is never read, only written.
13: Property HelloWorld::$map (SplObjectStorage<DateTime, DateTimeImmutable>|null) does not accept SplObjectStorage<object, mixed>. Full report
|
@dktapps After the latest commit in dev-master, PHPStan now reports different result with your code snippet: @@ @@
+10: Property HelloWorld::$map is never read, only written.
13: Property HelloWorld::$map (SplObjectStorage<DateTime, DateTimeImmutable>|null) does not accept SplObjectStorage<object, mixed>. Full report
|
nikic
added a commit
to nikic/PHP-Parser
that referenced
this issue
Sep 17, 2022
New baseline errors are array types that I prefer to leave alone, as well as one PhpStan bug: phpstan/phpstan#4526
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/708c1e20-8078-42f0-b18a-d22aaf41ea21
Expected output
No error should be reported.
The text was updated successfully, but these errors were encountered: