Psalm remembers previous array key assertion even if array is replaced
Open
Nobody has claimed this yet.
bug
regression
- Dominant language
- PHP
- Stars
- 5.9k
- Forks
- 708
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 25
Description
Thought it was a bug in my immutable refactoring, turns out it's also present upstream: https://psalm.dev/r/05f744e632
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the reproduction at https://psalm.dev/r/05f744e632 and trace Psalm's handling of array-key assertions when an array is replaced. Identify the relevant analyzer tests or entry point, add a regression case for the reproduced behavior, and confirm that the previous assertion no longer affects the replacement.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100