mirror of
https://github.com/danog/psalm.git
synced 2024-11-30 04:39:00 +01:00
17edb2bbe6
* Add tests for keyed integer assignemnt * First pass to get keyed integer assignment working * Fix array assignment to object-like with different key type * Improve treatment of objectlikes for callable and iterable comparisons * Fix array assignment to strings and addition * Convert expression to CNF * Do better at merging property types * Fix array_rand key type |
||
---|---|---|
assets/config_levels | ||
bin | ||
docs | ||
examples | ||
src/Psalm | ||
tests | ||
.editorconfig | ||
.gitignore | ||
.php_cs.dist | ||
.scrutinizer.yml | ||
.travis.yml | ||
composer.json | ||
composer.lock | ||
config.xsd | ||
LICENSE | ||
phpcs.xml | ||
phpunit.xml.dist | ||
psalm.xml | ||
PsalmLogo.png | ||
README.md |
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.6+ 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 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.
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.