-
Notifications
You must be signed in to change notification settings - Fork 237
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
Static code analysis #1451
Comments
I have a hard time installing Psalm because we use some older libraries around Selenium which require older versions of PHPUnit which require a different version of That's bad because we can't easily upgrade. <Insert a rant here about how this wouldn't be a problem at all in JavaScript / npm, how I dislike the concept of classes, etc.> I'm not sure how to resolve this. Psalm has a relatively long list of dependencies, as does any serious tool. Conflicts in versions are likely. What does the PHP world do in these situations? |
This should be the solution: https://github.com/bamarni/composer-bin-plugin I hope it works reliably. |
During the past two years, I have spent most of my time in TypeScript and going back to PHP feels... not very pleasant to be honest. We can't do much about the language but we could modernize our codebase, for example, bump required version of PHP and use newer language features (#1408), or introduce more static checking.
We already have an issue about PHPStan – #1210 – however, I recently read this amazing article which discusses these tools:
It sparked my interest and I researched this area briefly. Here are the notes:
@psalm-param Closure(int):bool
or@psalm-param 'Yes'|'No'
which is awesome. (I believe that the tool needs to introduce some sort of its syntax because PHP & PHPDoc are not enough to describe the types properly.)I plan to experiment with Psalm soon.
The text was updated successfully, but these errors were encountered: