Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix iterator_to_array return type with generators #3652

Open
wants to merge 1 commit into
base: 1.12.x
Choose a base branch
from

Conversation

paulbalandan
Copy link
Contributor

Generators allow any type for its keys. When passed to iterator_to_array(), the keys are coerced to string or int where possible. For non-scalar keys, the function throws.

Current PHPStan behaviour: https://phpstan.org/r/2489fc17-69f8-4e75-894a-48e9cb1b211f
Expected behaviours:

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