1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00
psalm/README.md
2017-02-13 00:14:20 -05:00

1.6 KiB

logo

Packagist Travis CI

Psalm is a static analysis tool for finding errors in PHP applications.

  • v0.3.x supports checking PHP 5.4 - 7.1 code, and requires PHP 5.5+ to run.
  • v0.2.x supports checking PHP 5.4 - 7.0 code and requires PHP 5.4+ to run.

Check out the wiki or try a live demo!

Quickstart Guide

Install via Composer:

composer require --dev vimeo/psalm

Add a psalm.xml 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 in psalm --init. You can also learn about how to suppress certain issues here.

Acknowledgements

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

Thanks also to @nikic for creating the excellent php-parser, on top of which Psalm is built.