Skip to content
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

update to drupal 11 #27

Open
wants to merge 11 commits into
base: 11-0
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
6 changes: 5 additions & 1 deletion .ddev/commands/web/install
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ drush site:install standard --account-name=admin --account-pass=admin --site-nam
drush en admin_toolbar admin_toolbar_tools config_inspector devel

# Install eslint dependencies
yarn --cwd $DDEV_DOCROOT/core install
# The "--cwd" argument doesn't work with Yarn 4.4, because the global version
# is returned as 1.22.22 when Yarn starts, before switching directories.
cd $DDEV_DOCROOT/core
yarn install
cd -
Copy link
Contributor

Choose a reason for hiding this comment

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

@byrond This change suggests a fail elsewhere. How do I trigger that failure?

Copy link
Contributor Author

@byrond byrond Dec 13, 2024

Choose a reason for hiding this comment

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

This happened during ddev install:

yarn install v1.22.22
[1/5] Validating package.json...
error Drupal@: The engine "yarn" is incompatible with this module. Expected version ">= 4.1.1". Got "1.22.22"
error Found incompatible module.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

I believe it's because the required Yarn version isn't known until changing into the core directory, after Yarn has already started with the global version installed in the container.

The later version of Yarn is required now since I changed DDEV's nodejs_version to 22 as is now required by Drupal 11. The minimum version is 20, but I updated to the current LTS.

# Configure prettier
test -e .prettierrc.json || ln -s $DDEV_DOCROOT/core/.prettierrc.json .
test -e .prettierignore || echo '*.yml' > .prettierignore
8 changes: 4 additions & 4 deletions .ddev/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ additional_hostnames:
- d10
additional_fqdns: []
database:
type: mariadb
version: "10.6"
type: mariadb
version: "10.6"
use_dns_when_possible: true
composer_version: "2"
nodejs_version: "22"
corepack_enable: true
web_environment:
- SIMPLETEST_DB=mysql://db:db@db/db
- DRUPAL_NIGHTWATCH_OUTPUT=reports/nightwatch
Expand All @@ -32,8 +34,6 @@ web_environment:
- MINK_DRIVER_ARGS_WEBDRIVER=[\"chrome\", {\"browserName\":\"chrome\",\"goog:chromeOptions\":{\"w3c\":false,\"args\":[\"--disable-gpu\",\"--headless\", \"--no-sandbox\", \"--disable-dev-shm-usage\"]}}, \"http://selenium-chrome:4444/wd/hub\"]
- DRUPAL_TEST_BASE_URL=http://web
- DRUPAL_NIGHTWATCH_IGNORE_DIRECTORIES=node_modules,vendor,.*,sites/*/files,sites/*/private,sites/simpletest
nodejs_version: "18"
corepack_enable: false

# Key features of DDEV's config.yaml:

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ The `cspell` command runs [CSpell](https://cspell.org/) using the core configura

The `compat` command will run PHPCS against the selected module using the `PHPCompatibility` coding standard.

Use the `-v` flag to specify a PHP version to test. By default, the version is `8.2`.
Use the `-v` flag to specify a PHP version to test. By default, the version is `8.3`.

### ddev eslint

Expand Down Expand Up @@ -158,7 +158,7 @@ The `rector` command will run Drupal Rector updates against the selected module,

**Command:** `ddev remove MODULE`

**Example:** `ddev rector admin_toolbar`
**Example:** `ddev remove admin_toolbar`

The `ddev remove` command will uninstall a module and delete it from the `web/modules/contrib` directory.

Expand Down
7 changes: 6 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,15 @@
"mglaman/drupal-check": "^1.5",
"mikey179/vfsstream": "^1.6",
"palantirnet/drupal-rector": "^0.20.3",
"phpcompatibility/php-compatibility": "^9.3",
"phpmd/phpmd": "^2.15",
"phpspec/prophecy": "^1.19",
"phpspec/prophecy-phpunit": "^2.2",
"phpspec/prophecy-phpunit": "^2.3",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan-deprecation-rules": "^1.1",
"phpstan/phpstan-strict-rules": "^1.5",
"phpunit/phpunit": "^10.5",
"squizlabs/php_codesniffer": "^3.7",
"symfony/phpunit-bridge": "^7.1",
"zaporylie/composer-drupal-optimizations": "^1.2"
},
Expand Down
172 changes: 142 additions & 30 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.