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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ cd ~/Sites/xb-dev
ddev config --project-type=drupal11 --docroot=web

# Create the Drupal project.
ddev composer create drupal/recommended-project:11.x@dev --no-install
ddev composer create drupal/recommended-project:11.x --no-install

# Install the add-on.
ddev add-on get drupal-xb/ddev-drupal-xb-dev
Expand Down
20 changes: 18 additions & 2 deletions commands/host/xb-setup
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ ddev composer require \
--no-interaction \
drush/drush

# Set the minimum stability to dev, so Experience Builder can be installed.
# The installation instructions suggest using the non-dev version of
# `drupal/recommended-project` to match XB's CI.
ddev composer config minimum-stability dev

# Require the Experience Builder module. Still don't install.
ddev composer config \
repositories.xb \
Expand All @@ -74,13 +79,24 @@ ddev composer require \
drupal/experience_builder

# Require dev dependencies. NOW install.
# We specifically require the 1.x versions of the following packages:
# - mglaman/phpstan-drupal
# - phpstan/phpstan
# - phpstan/phpstan-phpunit
# XB's codebase does not support PHPStan 2 yet, but drupal-core/dev allows
# both 1.x and 2.x versions of these packages. This way we can install the 1.x
# version of `jangregor/phpstan-prophecy`.
ddev composer require \
--dev \
--update-with-all-dependencies \
--no-interaction \
devizzent/cebe-php-openapi:^1.1.4 \
drupal/core-dev:~11.1 \
devizzent/cebe-php-openapi:^1.0.3 \
drupal/metatag:^2. \
jangregor/phpstan-prophecy:^2.2.0 \
mglaman/phpstan-drupal:^1.3.9 \
phpstan/phpstan:^1.12.27 \
phpstan/phpstan-phpunit:^1.4.2 \
jangregor/phpstan-prophecy:^1.0.2 \
league/openapi-psr7-validator:^0.22.0 \
webflo/drupal-finder:^1.3.1

Expand Down