1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 12:55:26 +01:00
psalm/docs/running_psalm/installation.md
2020-02-17 22:06:28 -05:00

729 B
Raw Blame History

Installation

Psalm Requires PHP >= 7.1 and Composer.

composer require --dev vimeo/psalm

Add a psalm.xml config:

./vendor/bin/psalm --init

Psalm will scan your project and figure out an appropriate error level for your codebase.

Then run Psalm:

./vendor/bin/psalm

Psalm will probably find a number of issues - find out how to deal with them in Dealing with code issues.

Using the Phar

Sometimes your project can conflict with one or more of Psalms dependencies.

In that case you may find the Phar (a self-contained PHP executable) useful.

Run composer require --dev psalm/phar to install it.