Repository navigation
fix(assertions): $a !== $b with several possible values of $b doesn't exclude them all - #14525
Conversation
… exclude them all vimeo#10534 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Behaviour change
Verified: |
✅ Performance: unchanged · Types: unchanged
How to read this table
head bebe72b · base b5ea40d (merge-base) · workflow run |
… doesn't exclude them vimeo#10487 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Behaviour change (update, 2nd commit): the negation of |
# Conflicts: # tests/TypeReconciliation/RedundantConditionTest.php
# Conflicts: # tests/TypeReconciliation/RedundantConditionTest.php
|
Thanks @jirkace! |
After
if ($new === $old) return;with$olda union of literals, Psalm takes$newto be none of them, so a later check of those values is a falseRedundantCondition.Before
After
The elseif after such a comparison
The same negation removes the values from the variable compared, so an
elseifcomparing it with another variable of those values is a falseTypeDoesNotContainType.Before
After
Fixes #10534
Fixes #10487