Skip to content

Downgrade PHPStan to 1.x, match Drupal core version of XB's CI #43

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

balintbrews
Copy link
Contributor

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 a composer.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 on drupal-core/dev, so I added that back in our manual installation.

The result is matching the CI results for 0.x:

PHPStan results

Copy link
Contributor

@penyaskito penyaskito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏽

@penyaskito penyaskito mentioned this pull request Jun 3, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants