Skip to content

array as a generic type T (e.g. ClassName<array<array-key,mixed>>) causing a covariant issue #10247

Answered by gromson
gromson asked this question in Support
Discussion options

You must be logged in to vote

Alright, the problem is solved by defining ArrayStrategy as a generic type:
https://phpstan.org/r/17fc159d-467b-4ea9-a944-105fea139a97

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ondrejmirtes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Support
Labels
None yet
1 participant