Psalm is one of the biggest and most powerful PHP Static analysis tools, featuring exclusive features like security analysis.
Psalm v6 was recently released, and in Psalm 6.3, a new tool called psalm-review was added.
It allows users to manually review found issues one by one in your favorite IDE: just start it on a JSON report generated by Psalm, and it will open your preferred IDE on the exact line and column where the issue occurred:
./vendor/bin/psalm-review report.json code|phpstorm|code-server [ inv|rev|[~-]IssueType1 ] [ [~-]IssueType2 ] ...
The tool may also be run using the main `psalm` entry point, useful for example when working with the phar:
./vendor/bin/psalm.phar --review report.json code|phpstorm|code-server [ inv|rev|[~-]IssueType1 ] [ [~-]IssueType2 ] ...
The extra arguments may be used to filter only for issues of the specified types, or for all issues except the specified types (with the ~
or -
inversion).
The rev
or inv
keywords may be used to start from the end of the report instead of at the beginning.
This post is part of a series of posts about Psalm v6’s new features, click here to see all the other posts in the series, and subscribe to the newsletter to always stay up to date on the latest Psalm news and developments!