2016-12-12 21:32:01 +01:00
< h1 > < a href = "https://getpsalm.org" > < img src = "PsalmLogo.png" height = "64" alt = "logo" / > < / a > < / h1 >
2016-07-18 22:46:44 +02:00
2017-02-04 03:35:40 +01:00
[![Packagist ](https://img.shields.io/packagist/v/vimeo/psalm.svg )](https://packagist.org/packages/vimeo/psalm)
2017-02-09 07:54:41 +01:00
[![Travis CI ](https://img.shields.io/travis/vimeo/psalm/master.svg )](https://travis-ci.org/vimeo/psalm/branches)
2017-12-14 06:40:22 +01:00
[![Coverage Status ](https://coveralls.io/repos/github/vimeo/psalm/badge.svg )](https://coveralls.io/github/vimeo/psalm)
2017-02-04 03:35:40 +01:00
2016-12-05 05:19:14 +01:00
Psalm is a static analysis tool for finding errors in PHP applications.
2017-05-02 18:23:53 +02:00
- **v0.3.x** supports checking PHP 5.4 - 7.1 code, and requires **PHP 5.6+** to run.
2016-12-12 16:29:43 +01:00
- **v0.2.x** supports checking PHP 5.4 - 7.0 code and requires **PHP 5.4+** to run.
2016-11-11 20:19:31 +01:00
2016-12-12 18:02:31 +01:00
Check out the [wiki ](https://github.com/vimeo/psalm/wiki ) or [try a live demo ](https://getpsalm.org/ )!
2016-11-21 21:15:23 +01:00
## Quickstart Guide
Install via [Composer ](https://getcomposer.org/ ):
```bash
2017-01-17 13:51:36 +01:00
composer require --dev vimeo/psalm
2016-11-21 21:15:23 +01:00
```
2017-02-13 06:16:22 +01:00
Add a config:
2016-11-21 21:15:23 +01:00
```bash
2017-02-13 06:14:20 +01:00
./vendor/bin/psalm --init
2016-11-21 21:15:23 +01:00
```
2017-02-13 06:14:20 +01:00
Then run Psalm:
2016-11-21 21:15:23 +01:00
```bash
./vendor/bin/psalm
```
2017-02-13 06:16:22 +01:00
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
```bash
./vendor/bin/psalm --init [source_dir] [level]
```
2017-02-13 06:18:49 +01:00
You can also [learn how to suppress certain issues ](https://github.com/vimeo/psalm/wiki/Dealing-with-code-issues ).
2017-01-16 23:20:07 +01:00
## Acknowledgements
The engineering team [@vimeo ](https://github.com/vimeo ) for encouragement and patience, especially [@nbeliard ](https://github.com/nbeliard ), [@erunion ](https://github.com/erunion ) and [@nickyr ](https://github.com/nickyr ).
Thanks also to [@nikic ](https://github.com/nikic ) for creating the excellent [php-parser ](https://github.com/nikic/php-parser ), on top of which Psalm is built.