A static analysis tool for finding errors in PHP applications
Clone or download
Latest commit 0358719 Jan 16, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets/config_levels Add separate issue type for undefined interface method Jan 13, 2019
bin Plugin interface segregation (#1076) Nov 12, 2018
docs Add separate issue type for undefined interface method Jan 13, 2019
examples Add function casing example plugin Jan 7, 2019
src Added DateTime::createFromImmutable() Jan 17, 2019
tests Fix issue with implemented class interface in subclass Jan 16, 2019
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 use xdebug filter for faster builds Jan 14, 2019
CHANGELOG.md Add v3 changes Nov 18, 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 Fix wording nits in documentation Oct 27, 2018
box.json.dist Bump Box Oct 8, 2018
composer.json Remove unused library Jan 16, 2019
config.xsd Add separate issue type for undefined interface method Jan 13, 2019
keys.asc.gpg Fix signing (I hope) of releases Dec 14, 2018
phpcs.xml Move internal classes to own namespace Nov 12, 2018
phpunit.xml.dist Fix codecoverage refs Nov 12, 2018
psalm Move Psalm execution code into PHP file that Psalm can analyse Dec 29, 2017
psalm-language-server Change permissions on the language server executable Oct 19, 2018
psalm-plugin Plugin loading (#855) Nov 11, 2018
psalm.xml.dist Enable casing plugin and fix issues it found Jan 12, 2019
psalter Break file manipulation out into Psalter Jan 7, 2018
scoper.inc.php Plugin interface segregation (#1076) Nov 12, 2018

README.md

logo

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:

./vendor/bin/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.

Acknowledgements

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