@psalmphp

Psalm is a type-checking static analysis tool for PHP that finds bugs humans can miss, and improves code quality. Try it at https://nitter.cf/t.co/eBajkMPMkn

CI builds
Joined December 2018
Running @psalmphp on my tests code has been a good decision so far. Makes it far easier to keep tests updated. Automation for the win!
1
1
4
If people want PHP generics then someone should create an RFC for erased-at-runtime generics. Erased-at-runtime types in PHP would be an insurmountable language shift for some voters, but maybe there’s enough support to carry it through.
1
5
1
40
All the major static analysis tools would quickly adapt, and there’s precedent in Python, which added support for type-erased generics (without a bundled typechecker to accompany that change).
2
1
6
It’s very unlikely that generics would be The Thing That Finally Makes Doubters Take PHP Seriously. But support for generics in PHP syntax (vs docblocks) would make a lot of code a little more beautiful than it is today.
1
2
16
Wrote a @psalmphp plugin to ensure I'm marking classes as final properly. If a concrete class does need to be inherited you can mark it with an Attribute to suppress the error. #php github.com/cspray/phinal
2
6
12
Me: 'Going from @psalmphp level 2 to level 1, how bad can it be?' Psalm: 533 errors found
4
2
1
22
As JetBrains we condemn the attacks taking place. Our hearts are with the Ukrainian people, including our own colleagues and their families.
195
2,307
354
15,295
Done and done. phpcs applies my coding standard consistently and psalm statically analyzes codebase to make sure all types are correct. 99.5035% type safe according to psalm.
Replying to @jwage
80% is excellent IMO. Now just add some linting and code quality rules and you are winning at life ;)
1
10
👋 We're hiring a Senior Software Engineer in Berlin or remote! 💻 Build high-quality supply chain tools for thousands of devs in the PHP ecosystem 🐘 with the makers of #composerphp #php #phpc
11
95
12
218
While most of the work on Psalm is about getting it understand your code right, there's a place for UI improvements as well. There are several that are either already shipped or coming soon: 1. Psalm now linkifies files in supporting terminals (thanks to @gregorharlan)
3
6
34
While most of the work on Psalm is about getting it understand your code right, there's a place for UI improvements as well. There are several that are either already shipped or coming soon: 1. Psalm now linkifies files in supporting terminals (thanks to @gregorharlan)
3
6
34
2. Psalm now highlights file names to provide visual anchors
2
1
6
And 3. Psalm now outputs PHP version it uses for code analysis (and explains why it uses it)
6
This was contributed by @Rarst
5