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

using list in phpdoc #905

Closed
staabm opened this issue Dec 13, 2022 · 5 comments
Closed

using list in phpdoc #905

staabm opened this issue Dec 13, 2022 · 5 comments

Comments

@staabm
Copy link
Contributor

staabm commented Dec 13, 2022

would you accept a PR which turns array-phpdoc types into lists where appropriate?

@nikic
Copy link
Owner

nikic commented Dec 13, 2022

Are list types supported by both PhpStan and PhpStorm?

@staabm
Copy link
Contributor Author

staabm commented Dec 13, 2022

phpstan and psalm support it.

phpstorm seem to at least not error about it, even if you violate the list constraints:

grafik

@nikic
Copy link
Owner

nikic commented Dec 13, 2022

For PhpStorm I'm mainly interested in auto-complete not breaking, not so much validation.

I think using list<> would be fine for the master branch, which uses phpstan.

@staabm
Copy link
Contributor Author

staabm commented Dec 14, 2022

I did not find any mentions of phpstan at the master branch?

@nikic
Copy link
Owner

nikic commented Dec 14, 2022

I did not find any mentions of phpstan at the master branch?

Config is in https://github.com/nikic/PHP-Parser/blob/master/phpstan.neon.dist and the dependency in the tools/ directory. IIRC it can't be a dependency of the main project because of version conflicts.

nikic pushed a commit that referenced this issue Dec 14, 2022
@nikic nikic closed this as completed Dec 16, 2022
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

No branches or pull requests

2 participants