You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
lowercase/uppercase string lost after != '' #12312
Activity
VincentLanglet commentedon Dec 22, 2024
I think it's because of the following code
https://github.com/phpstan/phpstan-src/blob/aa4a1232d2fbd6460632cb55d337e18539757281/src/Type/TypeCombinator.php#L448-L486
and the fact lowercase/uppercase string are described at the precise level.
I opened a PR phpstan/phpstan-src#3751
staabm commentedon Dec 22, 2024
there is more wrong with uppercase/lowercase string:
https://phpstan.org/r/9d4efc4c-96da-4656-95f0-492c8caf4892
edit: did not see your above comment until now. maybe your fix also fixes these cases
VincentLanglet commentedon Dec 22, 2024
What is wrong about your example ?
When I try
'0' == ''on php, I get falseAlso, you get the same result without upper/lower case
https://phpstan.org/r/e563596d-b1f8-4e73-b592-f64baeca0c19
staabm commentedon Dec 22, 2024
I think you are right. Mixed it up with non typed param
ondrejmirtes commentedon Jan 16, 2025
Fixed phpstan/phpstan-src#3751
github-actions commentedon Feb 17, 2025
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.