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

Add non-empty-list pseudo-type #183

Merged
merged 2 commits into from
Mar 12, 2023
Merged

Add non-empty-list pseudo-type #183

merged 2 commits into from
Mar 12, 2023

Conversation

schodemeiss
Copy link
Contributor

@schodemeiss schodemeiss commented Mar 10, 2023

Add support for 'non-empty-list'.

See https://phpstan.org/writing-php-code/phpdoc-types#lists

Symfony's Serializer also uses the TypeResolver library to determine how to serialize 'list's, but currently doesn't support 'non-empty-list' due to it missing here. This resolves that, which means arrays of objects can correctly be serialized into that array of objects, and vice-versa.

@jaapio
Copy link
Member

jaapio commented Mar 10, 2023

Thanks, please note that the current main branch (1.x) is not stable for release yet. It might take a while before we get there. due to some BC issues we are facing.

#178

@schodemeiss
Copy link
Contributor Author

schodemeiss commented Mar 10, 2023

Thanks, please note that the current main branch (1.x) is not stable for release yet. It might take a while before we get there. due to some BC issues we are facing.

No worries. I fixed the code-style error in the meantime. So this should be good to merge in should it be approved.

Anything I can do to help out with #178 ? For example, if it's possible how to describe how to reproduce, I might be able to help mend that.

@jaapio
Copy link
Member

jaapio commented Mar 10, 2023

I will come back to this, but it is related to #176.

We supported a notation with nullable types like native php did. But we dropped this because phpstan does not support this in types.

@jaapio jaapio merged commit ac4f96a into phpDocumentor:1.x Mar 12, 2023
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.

2 participants