You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feature #1265 Add phpstan to github actions workflow (burned42)
This PR was squashed before being merged into the main branch.
Discussion
----------
Add phpstan to github actions workflow
Fixes#1260
I tried checking different repos under https://github.com/symfony to see how those solve running phpstan and tried to apply that here. I saw that all the repos seem to install phpstan in the actions workflows instead of adding them to composer.json,so I did that, too. Also it seems like all of the projects I checked out are using the phpstan level 5, so that's what I was using. What I also found out is that most of them configured phpstan to use some phpunit autoload file, that's also why phpunit has to be installed in the workflow before running phpstan.
Most of the errors reported with this configuration are probably not that hard to solve, but I didn't want to include any unrelated code changes here, so I added a baseline file. I can also try to fix them if you think that should be part of this PR.
I think adding phpstan to the lint workflow sounds right, but I wasn't too sure if phpstan should be added to the 'linters' job or if it should get its own job. I decided to add it to the existing one to avoid having to duplicate all the composer/php setup steps into another job.
I hope that's something like what you expected to see regarding running phpstan for this project :)
Commits
-------
30a6fd9 Add phpstan to github actions workflow
0 commit comments