Skip to content
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

Dumping an array type causes phpstan to forget what it knew about the type #7803

Closed
mad-briller opened this issue Aug 16, 2022 · 2 comments · Fixed by phpstan/phpstan-src#1665
Labels
Milestone

Comments

@mad-briller
Copy link
Contributor

Bug report

Using PHPStan\dumpType to investigate types causes side-effects on the inspected types when the type is an array:

Code snippet that reproduces the problem

https://phpstan.org/r/9f986651-78d9-45c7-8718-d6a7f7eedc9e

Expected output

I would expect the same output for count in both locations.

Did PHPStan help you today? Did it make you happy in any way?

As always, it helps me and my org. every day!

@github-actions
Copy link

github-actions bot commented Oct 1, 2022

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants