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

Improve parsing of list shapes #8841

Merged
merged 5 commits into from Dec 13, 2022
Merged

Improve parsing of list shapes #8841

merged 5 commits into from Dec 13, 2022

Conversation

danog
Copy link
Collaborator

@danog danog commented Dec 5, 2022

Fixes parsing of list shape phpdocs with optional keys: list{0: int, 1?: int, 2?: string}

@danog danog added the release:fix The PR will be included in 'Fixes' section of the release notes label Dec 5, 2022
@weirdan
Copy link
Collaborator

weirdan commented Dec 5, 2022

Why would we need this?

@danog
Copy link
Collaborator Author

danog commented Dec 5, 2022

This is actually a valid usecase that's already documented and works properly in assertions, but not in docblocks.

@weirdan
Copy link
Collaborator

weirdan commented Dec 5, 2022

Would you mind adding a test for list{2: string, 1: string, 0: string}? I'm not even sure whether that's valid (if order is not preserved) or invalid (if it is) list. That's the case that would have been prevented if we did not support keys in list{}.

@danog
Copy link
Collaborator Author

danog commented Dec 5, 2022

Done!

@orklah orklah merged commit 027354c into vimeo:master Dec 13, 2022
@orklah
Copy link
Collaborator

orklah commented Dec 13, 2022

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:fix The PR will be included in 'Fixes' section of the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants