We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This error is new with PhpStan 1.9.4. It was handled correctly with 1.9.2.
We assign a boolean to false, and invert it on every iteration of a loop. PhpStan nevertheless decides it is always true.
https://phpstan.org/r/89bb3bd7-fad3-403e-8853-116078dfb44f
No errors.
PhpStan reports that the condition is always true. It is incorrect. Demo, if needed, is at https://onlinephp.io?s=dZDBasMwDIbPDuQdRMkhgV7a3ZKF0VvfoIetFM9ViJiJjeUUwti7V3Yp6WVgS_Dr0wf2-4cfPVzRWB2w5hjIxEtcPDL0sGu6sigLmTHDEa11JxfstSx-y0L5-duSAY46ShvmyURyE7BeMlk3LdwcCawSraofXEQ5aMvY5cA65w8h6BR_7raw38LbOY8GF1CbEeoXRjNU1EB2PWWP1r9aFQ2yJvkTVWhGBxvqK4KEE0MMM35Nmwf_Byi7_8NZvdKppiJXzvonbbs-vLsD&v=7.3.33%2C8.1.7%2C8.0.20%2C7.4.30
I am usually very happy with PhpStan. Not today, I'm afraid - hopefully just a minor aberration.
The text was updated successfully, but these errors were encountered:
Jfyi, this could be the same or very related to #8621
Sorry, something went wrong.
Fixed: phpstan/phpstan-src@cde53d1
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.
No branches or pull requests
Bug report
This error is new with PhpStan 1.9.4. It was handled correctly with 1.9.2.
We assign a boolean to false, and invert it on every iteration of a loop. PhpStan nevertheless decides it is always true.
Code snippet that reproduces the problem
https://phpstan.org/r/89bb3bd7-fad3-403e-8853-116078dfb44f
Expected output
No errors.
PhpStan reports that the condition is always true. It is incorrect. Demo, if needed, is at https://onlinephp.io?s=dZDBasMwDIbPDuQdRMkhgV7a3ZKF0VvfoIetFM9ViJiJjeUUwti7V3Yp6WVgS_Dr0wf2-4cfPVzRWB2w5hjIxEtcPDL0sGu6sigLmTHDEa11JxfstSx-y0L5-duSAY46ShvmyURyE7BeMlk3LdwcCawSraofXEQ5aMvY5cA65w8h6BR_7raw38LbOY8GF1CbEeoXRjNU1EB2PWWP1r9aFQ2yJvkTVWhGBxvqK4KEE0MMM35Nmwf_Byi7_8NZvdKppiJXzvonbbs-vLsD&v=7.3.33%2C8.1.7%2C8.0.20%2C7.4.30
Did PHPStan help you today? Did it make you happy in any way?
I am usually very happy with PhpStan. Not today, I'm afraid - hopefully just a minor aberration.
The text was updated successfully, but these errors were encountered: