Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PHPStan is a good addition to our QA toolkit and with improvements PHPStan has made over the years is now a viable tool for YoastCS to use (previously it would give way too many false positives).
This commit:
basics
workflow in GH Actions.Notes:
setup-php
now.This does carry a risk if PHPStan would make breaking changes or if a new release adds rules for the levels being scanned as, in that case, builds could unexpectedly start failing.
We could fix the version
setup-php
action installs to the current release1.10.50
, but that adds an additional maintenance burden of having to keep updating the version as PHPStan releases pretty often.So, for now, I've elected to run the risk of random failures. If and when those start happening, we can re-evaluate.
Notes:
autoload
directive to ourcomposer.json
file as it would cause problems with the PHPCS autoloader..gitattributes
and the typical overload file for the configuration file to.gitignore
.Refs: