Skip to content

Expect only offsetSet() for an offset assignment from Psalm 7.13 on - #173

Merged
danog merged 1 commit into
psalm:2.xfrom
danog:offset-set-only
Nov 20, 2026
Merged

danog merged 1 commit into
psalm:2.xfrom
danog:offset-set-only

Conversation

@danog

@danog danog commented Nov 20, 2026

Copy link
Copy Markdown
Member

From Psalm 7.13 on, $c["10"] = "aaa"; on a Collection<int, string> reports the offsetSet() argument alone, not also an offsetGet() one; the scenario expecting both now only runs on older Psalm versions.

Psalm 7.13 no longer also reports the offsetGet() an assignment to an offset of an ArrayAccess object made.
@danog
danog merged commit 767027f into psalm:2.x Nov 20, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant