A static analysis tool for finding errors in PHP applications
Failed to load latest commit information.
assets/config_levels Add support for checking DeprecatedTrait and DeprecatedConstant Aug 10, 2018
bin Multi-stage builds (#928) Aug 2, 2018
docs nit: Fix return type in docs/supported_annotations.md Oct 18, 2018
examples Add tests for new functionality Oct 17, 2018
src Change `psalm --server` to `psalm-language-server` Oct 18, 2018
tests Add tests for new functionality Oct 17, 2018
vendor-bin/box Bump Box Oct 8, 2018
.editorconfig adding editorconfig that seems to match the php files (#163) Jun 26, 2017
.gitignore Ignore .ds_store May 19, 2018
.php_cs.dist Fix formatting in examples Jan 18, 2018
.scrutinizer.yml Attempt to fix builds on scrutinizer-ci (#788) Jun 1, 2018
.travis.yml Add secure github token Aug 7, 2018
CHANGELOG.md Solidify changes to V2 May 11, 2018
CODE_OF_CONDUCT.md Add code of conduct Dec 31, 2017
CONTRIBUTING.md Add reference to how Psalm works overview Jan 14, 2018
LICENSE Add license Nov 21, 2016
NEWS.md Prepare v2 dev release Apr 19, 2018
PsalmLogo.png New and improved logo Jan 16, 2017
README.md README Typo: missing word (#956) Aug 25, 2018
box.json.dist Bump Box Oct 8, 2018
composer.json Change `psalm --server` to `psalm-language-server` Oct 18, 2018
config.xsd Improve file hash reloading Oct 15, 2018
phpcs.xml Add server mode support with error reporting only Oct 17, 2018
phpunit.xml.dist Ignore new binary Oct 18, 2018
psalm Move Psalm execution code into PHP file that Psalm can analyse Dec 29, 2017
psalm-language-server Fix #1029 - add binary Oct 18, 2018
psalm.xml.dist Add server mode support with error reporting only Oct 17, 2018
psalter Break file manipulation out into Psalter Jan 7, 2018
scoper.inc.php Fix #748 - correct paths that stopped working May 30, 2018



Packagist Packagist Travis CI Coverage Status

Psalm is a static analysis tool for finding errors in PHP applications, built on top of PHP Parser.

It's able to find a large number of issues, but it can also be configured to only care about a small subset of those.

Try a live demo, or install it in your project by following the Quickstart Guide below.

Psalm documentation

Documentation is available on Psalm’s website, generated from the docs folder.

Quickstart Guide

Install via Composer:

composer require --dev vimeo/psalm

Add a config:

./vendor/bin/psalm --init

Then run Psalm:


The config created above will show you all issues in your code, but will emit INFO issues (as opposed to ERROR) for certain common trivial code problems. If you want a more lenient config you can specify the level with

./vendor/bin/psalm --init [source_dir] [level]

You can also learn how to suppress certain issues.

How Psalm Works

A basic rundown of Psalm’s internals can be found in docs/how_psalm_works.md.


The engineering team @vimeo for encouragement and patience, especially @nbeliard, @erunion and @nickyr.