1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00
Go to file
2016-12-09 18:53:26 -05:00
bin Add JSON output format 2016-12-07 22:38:57 -05:00
examples Add MissingPropertyType to default exceptions 2016-12-04 00:08:53 -05:00
src/Psalm Ignore nullrefs when using echo 2016-12-09 18:53:26 -05:00
tests Mark failing tests incomplete 2016-12-09 13:26:40 -05:00
.gitignore Fixing a typo in the .gitignore filename. 2016-10-20 11:52:14 -04:00
.travis.yml Fix files 2016-12-07 00:16:15 -05:00
composer.json Add phpunit config 2016-12-07 00:12:06 -05:00
composer.lock Further tweak travis 2016-12-07 00:07:33 -05:00
LICENSE Add license 2016-11-21 14:48:17 -05:00
phpcs.xml PSR-2 2016-11-02 17:50:54 -04:00
phpunit.xml Add bootstrap 2016-12-07 00:21:46 -05:00
psalm.xml Remove exceptions 2016-11-04 22:13:50 -04:00
PsalmLogo.png Update border 2016-10-29 12:46:34 -04:00
README.md Add link to live demo 2016-12-09 01:18:12 -05:00

logo

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

Version 0.3.x supports checking PHP 5.4 - 7.1 code, and requires PHP 5.5 and higher to run.

Version 0.2.x supports checking PHP 5.4 - 7.0 code and requires PHP 5.4 and higher to run.

Check out the wiki or try a live demo!

Quickstart Guide

Install via Composer:

composer require --dev "vimeo/psalm:dev-master"
composer install

Add a psalm.xml config:

cat > psalm.xml << EOF
<?xml version="1.0"?>
<psalm
  stopOnFirstError="false"
  useDocblockTypes="true"
>
    <inspectFiles>
        <directory name="src" />
    </inspectFiles>
</psalm>
EOF

Then run Psalm with:

./vendor/bin/psalm

The above config is spartan, and will show you all possible errors, including many that are likely irrelevant to you. A more lenient config is provided here.