Psalm

771 posts

Psalm banner
Psalm

Psalm

@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://t.co/eBajkMPMkn

CI builds Присоединился Aralık 2018
6 Подписки3.5K Подписчики
Psalm
Psalm@psalmphp·
Also announcing the public beta of Psalm v7, with up to 10x performance improvements for security analysis, a new combined analysis mode and much more! blog.daniil.it/2025/07/10/psa…
English
0
2
6
494
Psalm
Psalm@psalmphp·
@infection_php @phpstan Posted an implementation tip: switching infection to amphp/parallel with our ForkContext would be great for performance, and would also allow super simple Psalm integration!
English
0
0
0
118
Infection PHP
Infection PHP@infection_php·
So now we have an experimental @phpstan integration in Infection, by `--static-analysis-plugin=phpstan`. Let's try to do the same for @psalmphp - created a feature request to make it possible: github.com/vimeo/psalm/di… Give it some love!
English
1
3
8
828
Psalm
Psalm@psalmphp·
Announcing a new series of blogposts about Psalm v6's innovative performance improvements! Starting with Psalm 6.1 Deep Dive: Copy-on-Write + dynamic task dispatching: blog.daniil.it/2025/05/11/psa…
English
0
2
6
427
Psalm
Psalm@psalmphp·
Psalm 5 is out! To symbolise this tremendous group effort we've translated the announcement into all the languages of Psalm's maintainers: psalm.dev/articles/psalm…
English
2
23
46
0
Psalm
Psalm@psalmphp·
@jwage @nateritter @phpstan Psalm has a few features like security analysis and unused code detection, along with more rigorous analysis of if statements
English
1
0
1
0
Psalm ретвитнул
Jonathan H. Wage
Jonathan H. Wage@jwage·
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!
English
1
1
4
0
Psalm
Psalm@psalmphp·
@jwage You ready to make your code ludicrously safe? Then set rememberPropertyAssignmentsAfterCall to false, set findUnusedCode to true, ensureArrayStringOffsetsExist to true and ensureArrayIntOffsetsExist to true.
English
0
1
5
0
Psalm
Psalm@psalmphp·
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.
English
1
5
40
0
Psalm
Psalm@psalmphp·
@MabarDev The PHP project will probably never have an official typechecker. That doesn’t prevent it having syntax support for generics
English
0
0
0
0
Marek Bartoš
Marek Bartoš@MabarDev·
@psalmphp Wouldn't that potentially break all the code using native generics once type checking is implemented? We would end up with another declare(validate_generics = 1);
English
1
0
0
0
Psalm
Psalm@psalmphp·
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.
English
1
2
16
0
Psalm
Psalm@psalmphp·
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).
English
2
1
6
0
Psalm ретвитнул
Charles
Charles@charlesspray·
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
English
2
6
12
0
Psalm
Psalm@psalmphp·
@charlesspray I think classname would work better, mainly because that doesn't have three s in a row (so more resistant to typos)
English
0
0
1
0
Charles
Charles@charlesspray·
Ok, so I updated this to basically be an RFC to bring the `class-string` type, similar to @psalmphp, into internals.
English
1
0
0
0
Psalm
Psalm@psalmphp·
@jwage @THROWS No, but you could make a PR — the functionality shouldn't be too tricky to add.
English
0
0
1
0
Jonathan H. Wage
Jonathan H. Wage@jwage·
Can @psalmphp help with erroring on unhandled exceptions or what is the best way to improve this in a codebase?
English
1
1
0
0