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

Treat ConstantArrayType as covariant in its keys and values #2464

Merged
merged 1 commit into from Jun 17, 2023

Conversation

jiripudil
Copy link
Contributor

@jiripudil jiripudil commented Jun 17, 2023

Closes phpstan/phpstan#9161, as argued there, this should be safe because arrays are copy-on-write

@phpstan-bot
Copy link
Collaborator

You've opened the pull request against the latest branch 1.11.x. If your code is relevant on 1.10.x and you want it to be released sooner, please rebase your pull request and change its target to 1.10.x.

This should be safe because it is copy-on-write
@jiripudil jiripudil force-pushed the fix-constant-array-variance branch from d417dc3 to c9f04ef Compare June 17, 2023 13:54
@jiripudil jiripudil changed the base branch from 1.11.x to 1.10.x June 17, 2023 13:56
@ondrejmirtes ondrejmirtes merged commit f1cc53a into phpstan:1.10.x Jun 17, 2023
371 of 377 checks passed
@ondrejmirtes
Copy link
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants