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 array<empty, empty> not in array{foo?: mixed}<string, mixed> #5677

Merged
merged 2 commits into from Apr 30, 2021

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