Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Psalm integration #17

Closed
8 tasks done
boesing opened this issue Oct 4, 2020 · 2 comments · Fixed by #21
Closed
8 tasks done

Psalm integration #17

boesing opened this issue Oct 4, 2020 · 2 comments · Fixed by #21

Comments

@boesing
Copy link
Member

boesing commented Oct 4, 2020

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 in the project root
  • Copy and paste the contents from this psalm.xml.dist
  • Run $ composer require --dev vimeo/psalm
  • Run $ vendor/bin/psalm --set-baseline=psalm-baseline.xml
  • Add a composer script static-analysis with the command psalm --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 and scripts)
Optional
  • Fix as many psalm errors as possible.
@boesing boesing added Help Wanted Enhancement hacktoberfest-accepted Issues/Pull-Requests which can be fixed during Hacktoberfest: https://hacktoberfest.digitalocean.com labels Oct 4, 2020
@tux-rampage
Copy link
Member

@boesing composer require vimeo/psalm would add it as a runtime dependency. Shouldn't this be composer require --dev vimeo/psalm In general I'd even prefer composer global require vimeo/psalm locally and in CI to not mess with the dependency tree. Unlike PHPstan, psalm is not distributed with isolated dependencies.

@michalbundyra
Copy link
Member

@tux-rampage yes, it should be --dev

@tux-rampage tux-rampage linked a pull request Oct 23, 2020 that will close this issue
@tux-rampage tux-rampage removed Help Wanted hacktoberfest-accepted Issues/Pull-Requests which can be fixed during Hacktoberfest: https://hacktoberfest.digitalocean.com labels Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants