A static analysis tool for finding errors in PHP applications
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Image assets/config_levels Add separate issue type for undefined interface method Jan 13, 2019
Image bin Plugin interface segregation (#1076) Nov 12, 2018
Image docs Fix unnecessary params in Psalm codebase Feb 23, 2019
Image examples Fix unnecessary params in Psalm codebase Feb 23, 2019
Image src Use better heuristic to determine missing types Feb 23, 2019
Image tests Use better heuristic to determine missing types Feb 23, 2019
Image vendor-bin/box Bump Box Oct 8, 2018
Image .editorconfig adding editorconfig that seems to match the php files (#163) Jun 26, 2017
Image .gitignore Ignore .ds_store May 19, 2018
Image .php_cs.dist Fix formatting in examples Jan 18, 2018
Image .scrutinizer.yml Attempt to fix builds on scrutinizer-ci (#788) Jun 1, 2018
Image .travis.yml Enable 7.4snapshot to replace nightly (that's now 8.x) Feb 9, 2019
Image CHANGELOG.md Add v3 changes Nov 18, 2018
Image CODE_OF_CONDUCT.md Add code of conduct Dec 31, 2017
Image CONTRIBUTING.md Add reference to how Psalm works overview Jan 14, 2018
Image LICENSE Add license Nov 21, 2016
Image NEWS.md Prepare v2 dev release Apr 19, 2018
Image PsalmLogo.png New and improved logo Jan 16, 2017
Image README.md Update domain Feb 22, 2019
Image box.json.dist Remove PHP compactor because it kills CoreGenericFunctions/Classes fu… Feb 19, 2019
Image composer.json Update Amp usage Feb 6, 2019
Image config.xsd Fix unnecessary params in Psalm codebase Feb 23, 2019
Image keys.asc.gpg Fix signing (I hope) of releases Dec 14, 2018
Image phpcs.xml Move internal classes to own namespace Nov 12, 2018
Image phpunit.xml.dist Fix codecoverage refs Nov 12, 2018
Image psalm Move Psalm execution code into PHP file that Psalm can analyse Dec 29, 2017
Image psalm-language-server Change permissions on the language server executable Oct 19, 2018
Image psalm-plugin Plugin loading (#855) Nov 11, 2018
Image psalm.xml.dist Improve ergonomics of PHPStorm meta parsing Feb 16, 2019
Image psalter Break file manipulation out into Psalter Jan 7, 2018
Image scoper.inc.php Whitelist files we never want to change Feb 19, 2019

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.