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
2019-06-09 00:54:13 -04:00

652 B

Installation

Psalm Requires PHP >= 7.1 and Composer.

composer require --dev vimeo/psalm

Add a psalm.xml config:

./vendor/bin/psalm --init [source_directory=src] [config_level=3]

where config_level represents how strict you want Psalm to be. 1 is the strictest, 8 is the most lenient.

Example:

$ ./vendor/bin/psalm --init src 3
Config file created successfully. Please re-run psalm.

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.