Downgrade PHPStan to 1.x, match Drupal core version of XB's CI #43
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.
In #42 the Composer installation errors were solved. What I did not consider was that XB doesn't play well with PHPStan 2 yet. So we need to downgrade to PHPStan 1.x for now.
The challenge was that
drupal-core/dev
allows both 1.x. and 2.x versions of PHPStan and other packages that depend on PHPStan. So without acomposer.json
file to describe these dependencies, I needed to explicitly install compatible versions.After that I was still seeing a few PHPStan errors compared to no errors on CI for XB. I tracked that down to be differences in Drupal core. The installation instructions for this add-on included using
drupal/recommended-project:11.x@dev
, but XB specifies a stable version, which the CI will respect. I updated the installation instructions accordingly. That meant no more dependency ondrupal-core/dev
, so I added that back in our manual installation.The result is matching the CI results for
0.x
: