Skip to content

fix list methods so psalm doesn't see it as list<never>#351

Merged
shadowhand merged 1 commit intowebmozarts:masterfrom
alleknalle:list-never
Feb 27, 2026
Merged

fix list methods so psalm doesn't see it as list<never>#351
shadowhand merged 1 commit intowebmozarts:masterfrom
alleknalle:list-never

Conversation

@alleknalle
Copy link
Contributor

In version 2.1.3 annotations for all list methods have been changed to use @template T, @psalm-return list<T> and @psalm-assert list<T> $array (or something similar). This causes Psalm to sometimes think that an array is list<never>, see example https://psalm.dev/r/a999572021 and the test that I added.

@shadowhand shadowhand merged commit a236e26 into webmozarts:master Feb 27, 2026
9 checks passed
@shadowhand
Copy link
Collaborator

Released in version 2.1.6.

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.

2 participants