Skip to content

Treat ConstantArrayType as covariant in its keys and values#2464

Merged
ondrejmirtes merged 1 commit intophpstan:1.10.xfrom
jiripudil:fix-constant-array-variance
Jun 17, 2023
Merged

Treat ConstantArrayType as covariant in its keys and values#2464
ondrejmirtes merged 1 commit intophpstan:1.10.xfrom
jiripudil:fix-constant-array-variance

Conversation

@jiripudil
Copy link
Copy Markdown
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
Copy Markdown
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
@ondrejmirtes
Copy link
Copy Markdown
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

Development

Successfully merging this pull request may close these issues.

False positive with template covariant

3 participants