Closed gharlan closed 2 years ago
I found these snippets:
~It looks like the issue is with the negation of strict in_array
, this and this should be identical, but Psalm seems to think that if $int
is not in $ints
then it must not be an int
, which is incorrect. It's probably just comparing the types somewhere without accounting for the fact that they can have the same type but still be different.~
Scratch that, not sure what I was thinking there. Here's something that's actually useful though, doing a strict comparison against null fixes it.
I found these snippets:
Well I git bisect
ed it to #6233, but I'm not actually sure that's at fault, it seems more like a boolean algebra problem. I think this is the same problem without in_array
(proof it's wrong since I keep messing it up). git bisect
ing that points to a832d77d73aab8fcb498b3c7c8c82bfd50df30ec, which seems more relevant. Maybe @muglug can help with this?
I found these snippets:
The conjunctive normal form version (which Psalm uses internally) also shows the bug: https://psalm.dev/r/edc2283627
I found these snippets:
Fixed in the master branch
The culrpit was bad logic here.
It was simplifying (A || B || !B)
to (A)
, whereas it should have simplified it to true
@muglug Thanks for the quick fix. But shouldn't the fix target the 4.x
branch?
We're starting to have big differences between 4.x and master.
Fixing this in 4.x means basically fixing an old version then rebasing that on master and getting conflicts, so basically fixing it twice.
Recent events kinda disrupted availability and motivation of the team, I was hoping Psalm 5 would be available by now. In the meantime, it means some bugs are getting fixed on master unfortunately.
However, feel free to switch to our master branch and report us any bug that could appear!
https://psalm.dev/r/1b1ca51578