Psalm integration
Closed this issue · 0 comments
boesing commented
Feature Request
Q | A |
---|---|
QA | yes |
Summary
As decided during the Technical-Steering-Committee Meeting on August 3rd, 2020, Laminas wants to implement vimeo/psalm in all packages.
Implementing psalm is quite easy.
Required
- Create a
.psalm.xml.dist
in the project root - Copy and paste the contents from this psalm.xml.dist
- Run
$ composer require vimeo/psalm
- Run
$ vendor/bin/psalm --set-baseline=psalm-baseline.xml
- Add a composer script
static-analysis
with the commandpsalm --shepherd --stats
- Add a new line to
script:
in.travis.yml
:- if [[ $TEST_COVERAGE == 'true' ]]; then composer static-analysis ; fi
- Remove phpstan from the project (
phpstan.neon.dist
,.travis.yml
entry,composer.json
require-dev
andscripts
)
Optional
- Fix as many psalm errors as possible.