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 psalm #324
Comments
What's the point of using psalm and phpstan or psalm over phpstan? |
It will add more types (type inference) to the code. |
@vladyslavstartsev can you give some concrete examples where this would help? |
okey, I've finally got some time to explain -
message: "#^Property GuzzleHttp\\\\Psr7\\\\AppendStream\\:\\:\\$seekable has no typehint specified\\.$#"
count: 1
path: src/AppendStream.php
-
message: "#^Property GuzzleHttp\\\\Psr7\\\\AppendStream\\:\\:\\$current has no typehint specified\\.$#"
count: 1
path: src/AppendStream.php
-
message: "#^Property GuzzleHttp\\\\Psr7\\\\AppendStream\\:\\:\\$pos has no typehint specified\\.$#"
count: 1
path: src/AppendStream.php
-
message: "#^Method GuzzleHttp\\\\Psr7\\\\AppendStream\\:\\:addStream\\(\\) has no return typehint specified\\.$#"
count: 1
path: src/AppendStream.php
-
message: "#^Method GuzzleHttp\\\\Psr7\\\\AppendStream\\:\\:detach\\(\\) should return resource\\|null but return statement is missing\\.$#"
count: 1
path: src/AppendStream.php
-
message: "#^Method GuzzleHttp\\\\Psr7\\\\AppendStream\\:\\:rewind\\(\\) has no return typehint specified\\.$#"
count: 1
path: src/AppendStream.php
-
message: "#^Method GuzzleHttp\\\\Psr7\\\\AppendStream\\:\\:seek\\(\\) has no return typehint specified\\.$#"
count: 1
path: src/AppendStream.php
when we run the same analysis in psalm, here is our output
if we remove same issues that was found by phpstan. Here are extra issue found
I've used current master ( So with psalm we will have extra type errors found. The link you gave. phpstan and psalm can read each other tool specific annotations ( |
@Tobion what's your opinion? |
The psalm errors you listed are already reported by phpstan, just with a different wording.
in phpstan is reported that there is no type specified for AppendStream::$pos. To me there is no point in using phpstan and psalm at the same time. If you find concrete examples where it would help please open a PR. |
Description
since there is phpstan used in this repo. I would like to suggest to use psalm.
It also has baseline like phpstan
The text was updated successfully, but these errors were encountered: