Repository navigation
Commit 393f970
Keep conditional holder keys when entering a closure
enterAnonymousFunctionWithoutReflection() rebuilt each filtered holder
list with `[]`, renumbering the holders 0, 1, ... instead of keeping their
ConditionalExpressionHolder::getKey() keys. invalidateExpressionEntries()
pre-filters holders by whether their key mentions the invalidated
expression, so inside the closure a reassigned use variable never dropped
the conditionals it guards - a later match narrowed by a stale guard. The
native twin skipped the pre-filter for integer keys, so the two diverged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DEjx9cAdSfGZDQdTWKaX641 parent a491b72 commit 393f970
3 files changed
Lines changed: 53 additions & 3 deletions
File tree
- src/Analyser
- tests/PHPStan/Analyser/nsrt
- turbo-ext/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2597 | 2597 | | |
2598 | 2598 | | |
2599 | 2599 | | |
2600 | | - | |
| 2600 | + | |
2601 | 2601 | | |
2602 | 2602 | | |
2603 | 2603 | | |
2604 | 2604 | | |
2605 | 2605 | | |
2606 | | - | |
| 2606 | + | |
2607 | 2607 | | |
2608 | 2608 | | |
2609 | 2609 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5380 | 5380 | | |
5381 | 5381 | | |
5382 | 5382 | | |
5383 | | - | |
| 5383 | + | |
| 5384 | + | |
| 5385 | + | |
5384 | 5386 | | |
5385 | 5387 | | |
5386 | 5388 | | |
| |||
0 commit comments