-
Notifications
You must be signed in to change notification settings - Fork 57
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
Support phpstan v0.5 #43
Conversation
zdenekdrahos
commented
Dec 21, 2016
•
edited
Loading
edited
- basic integration, html report
- documentation, cleanup, ...
Unofrtunately there is no version :( PHPStan - PHP Static Analysis Tool
Works without extra config phpqa --report --output cli --tools phpstan --analyzedDirs src,tests --ignoredDirs=vendor Needs bootstrap phpqa --report --output cli --tools phpstan --analyzedDirs ./ --ignoredDirs=vendor
[Exec] Running vendor/bin/phpstan --version
PHPStan - PHP Static Analysis Tool |
It could overwrite existing phpstan.neon in CLI mode
I have quite a few remarks about this :) But it all boils down to the fact that it's probably too soon to integrate PHPStan into a toolsuite like yours.
And now to your questions:
I will add
Not right now, but local ignoring using annotations is on the roadmap.
I don't like it, it's yet another thing to think about or automate during the release process. I'd suggest to you to use this excellent package by Ocramius so you don't have to rely on tools implementing this command line option. Thank you very much for integrating PHPStan into phpqa. I am looking forward to work with you on this integration so it ends up being awesome and really usable for your users :) |
I don't think that your arguments are blockers. Phpstan is optional, not installed by default.
phpstan is suggested tool. User can install whatever version he likes/needs/... I cannot restrict version in
My preference of global phpqa doesn't mean that all users are like that. In some cases there is huge resistance to anything global. Especially with The phpunit issue seems to like edge-case that happens very rarely. Nothing that couldn't be solved by warning in readme. phpstan offtopic (not related to the integration)
Annotations aren't solution for mocking tools (Prophecy, mockista). It's impossible to add annotation to 3rd party code. Maybe more advanced
I didn't want to create multiple issues because I'm not sure if something is bug or the code is just bad.
Thanks. I'll look into it. I wouldn't underestimate But my point is from user perspective, yours from "publisher". I'm ok with your response, no additional discussion is needed :) |
My point is that PHPStan is going to change rapidly before it's ready for stable 1.0 release (well, I don't even want to use .neon files in the long run and who knows what else will change to be able to analyze code in a great way) so it's up to you if you will be able to catch up with new versions regularly. I hope so :) I'm also delighted that you find PHPStan something worth to integrate!
You don't have a reason to add annotation to 3rd party code, because PHPStan should not analyze 3rd party code. You should run it only on your PHPStan only reads metadata (reflection, phpDocs) from 3rd party code.
It will make sense to have it when PHPStan will support being installed as a global system tool :) I'll figure that out then. I will post a comment about the code in that linked gist to its comments. |
I've commented on the gist: https://gist.github.com/zdenekdrahos/9856da19f42832bcfa6115004ab778de#gistcomment-1955300 |
017c994
to
6df3d1e
Compare
Versions solved in #44 (https://travis-ci.org/EdgedesignCZ/phpqa/jobs/186305450#L480) I've got all the information I needed so I am locking this discussion. |