Skip to content

Improve parsing of list shapes#8841

Merged
orklah merged 5 commits intovimeo:masterfrom
nicelocal:list_shapes
Dec 13, 2022
Merged

Improve parsing of list shapes#8841
orklah merged 5 commits intovimeo:masterfrom
nicelocal:list_shapes

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.

3 participants