What does HackerNews think of psalm?

A static analysis tool for finding errors in PHP applications

Language: PHP

#159 in Hacktoberfest
#11 in PHP
You can use static code checking tools like Vimeo/Psalm and Phpstan. These tools statically checks your code finds inconsistencies, and potential variable, class misuses.

Definitely you should check stitcher.io for recent developments as well as phptherightway.com

https://github.com/vimeo/psalm https://github.com/phpstan/phpstan

Here's "git shortlog -sne", with Stripe employees (current and former) and email addresses removed. I've annotated with current company, if easily-discoverable: https://gist.github.com/muglug/a70b7316f92d05f9febbf56684a8e...

That list is a minority of all 166 in the original (and there may still be some Stripe accounts there).

Additionally all of the top 10 are current or former Stripe employees, and at least 96% of all commits come from current or former Stripe employees.

BUT there's also nothing wrong with this – in a similar project I created (https://github.com/vimeo/psalm), 90% of the commits come from employees at Vimeo. I was just pointing out it's good.

I think that the biggest win with this feature, is not that PHP will do more runtime type checks, but that the syntax is valid.

The past years we've seen several static analysers become more and more popular in the PHP community. Tools like phpstan (https://github.com/phpstan/phpstan) and psalm by Vimeo (https://github.com/vimeo/psalm).

Allowing this syntax is a great way to write cleaner code that can be statically analysed, which is far more superior than the runtime type checker.

Thanks for the recommendation – I've used PHPStorm when doing large refactors, and it's incredible.

Unfortunately, you can't force everyone to use it (especially given its price). That's why a bunch of people have written separate PHP static analysis tools:

Phan (https://github.com/phan/phan), PHPStan (https://github.com/phpstan/phpstan) and Psalm (https://github.com/vimeo/psalm), the last of which I created.