It’s time to explain some things

March 23, 2020 by Matt Brown - 1 minute read

For some of its users Psalm can seem mysterious – I often see commit messages along the lines of “make Psalm happy”, like it’s some sort of vengeful deity.

That’s obviously not great – Psalm aims to provide clarity, not sow confusion, so the latest version now includes links (in the tool‘s default output) that you can follow to understand why Psalm thinks something is problematic.

The links look like this:

ERROR: InvalidArgument - somefile.php:8:19 - Argument 1 of getAttribute expects string, int provided (see https://psalm.dev/004)

Clicking that link takes you to a dedicated help document that explains the issue in more detail, and provides potential fixes.

As with everything related to Psalm, all documentation is open-source. If you see something that could be improved, feel free to create a pull request!