Skip to content

Fix array<empty, empty> not in array{foo?: mixed}<string, mixed>#5677

Merged
muglug merged 2 commits intovimeo:masterfrom
VincentLanglet:empty
Apr 30, 2021
Merged

Fix array<empty, empty> not in array{foo?: mixed}<string, mixed>#5677
muglug merged 2 commits intovimeo:masterfrom
VincentLanglet:empty

Conversation

@VincentLanglet
Copy link
Contributor

@VincentLanglet VincentLanglet commented Apr 26, 2021

Trying to fix #4963
I tried to modify my vendor and this seems to fix the issue but there is certainly some improvements.

I'm not familiar at all with the different types.
Should I do something with List too ? Is there an easier way to check for empty array ?

@VincentLanglet
Copy link
Contributor Author

I can't decide if I should create a new file for the test or add one to an existing file ; any thought @muglug ?

@muglug
Copy link
Collaborator

muglug commented Apr 27, 2021

Merge/rebase master, where you'll find a tests/TypeComparatorTest.php with a place to slot yours in.

@VincentLanglet
Copy link
Contributor Author

Thanks @muglug, it works well. Test are failing without my fix. It's ready to be reviewed/improved :)

@muglug muglug merged commit fb5c5a9 into vimeo:master Apr 30, 2021
@muglug
Copy link
Collaborator

muglug commented Apr 30, 2021

Thanks!

@VincentLanglet VincentLanglet deleted the empty branch April 30, 2021 13:18
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.

Empty array not considered a subtype of the intersection of an object-like array type and an array type

2 participants