vimeo / vimeo/psalm

Psalm remembers previous array key assertion even if array is replaced

Open
#8,317 3 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.