1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00
psalm/README.md
2016-11-29 12:33:01 -05:00

854 B

logo

Psalm is a static analysis tool for finding errors in PHP applications, and runs in PHP 5.4+ and PHP 7.0.

Check out the wiki!

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.