Skip to content

Fix array and iterable type action methods on NeverType#1968

Merged
ondrejmirtes merged 1 commit intophpstan:1.9.xfrom
herndlm:fix-8277
Nov 5, 2022
Merged

Fix array and iterable type action methods on NeverType#1968
ondrejmirtes merged 1 commit intophpstan:1.9.xfrom
herndlm:fix-8277

Conversation

@herndlm
Copy link
Copy Markdown
Contributor

@herndlm herndlm commented Nov 4, 2022

What does he mean with that cryptic title again?
Basically, methods that work on the type / modify it instead of only describing its characteristics should not magically turn *NEVER* into mixed. Things like popArray() or shiftArray() for example.

And to be on the safe side and avoid similar future failures here I removed usage of the two relevant traits completely.

Closes phpstan/phpstan#8277

@ondrejmirtes ondrejmirtes merged commit 7a7b386 into phpstan:1.9.x Nov 5, 2022
@ondrejmirtes
Copy link
Copy Markdown
Member

Nice, thank you!

@herndlm herndlm deleted the fix-8277 branch November 5, 2022 19:39
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.9.0] count() return type is 1 in a loop where the value changes at each iteration

2 participants