r/PHPhelp • u/isoAntti • Apr 14 '26
New, better linter for php.
https://github.com/anttiryt/phplint
I got tired of stan being slow and normal linter not figuring out uninitialized variables which, as we know, crash php on php8.
0
Upvotes
6
u/oshjosh26 Apr 14 '26
Honestly, if you want more speed why not contribute to this project https://mago.carthage.software/
It's written in rust, and jetbrains is sponsoring it. I've been using it and it's great and 2.0 will include an LSP.
8
u/allen_jb Apr 14 '26
Not to detract from the work you've put in here, but primarily to point out to anyone who might not be aware:
PHPStan does a lot more than basic linting tho (and can be extended even further with a wide range of additional rulesets available on Packagist, or create your own).
If you're experiencing performance issues I'd suggest ensuring you have a result cache configured: https://phpstan.org/user-guide/result-cache
If you're using CI tools like GitHub Actions these often have caching systems that can allow you to save the PHPStan result cache across runs.
If PHPStan doesn't already do what you want, I'd suggest looking at creating custom PHPStan rules over writing your own tools.
(Most other static analysis tools have similar features)
7
u/colshrapnel Apr 14 '26 edited Apr 14 '26
O RLY?I believe you may be mistaken regarding this matter2
u/colshrapnel Apr 14 '26
Honest question, doesn't PHPStorm do all these checks just as you type?