Skip to content

Commit 8d76c89

Browse files
committed
Update DDEV addons.
1 parent cca4d11 commit 8d76c89

16 files changed

Lines changed: 93 additions & 46 deletions

.ddev/addon-metadata/ddev-drupal-contrib/manifest.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
name: ddev-drupal-contrib
22
repository: ddev/ddev-drupal-contrib
3-
version: 1.0.0
4-
install_date: "2025-06-30T10:01:42+02:00"
3+
version: 1.1.5
4+
install_date: "2026-03-24T18:22:38+01:00"
55
project_files:
6+
- commands/host/core-version
67
- commands/web/eslint
78
- commands/web/expand-composer-json
89
- commands/web/nightwatch
Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,9 @@
11
name: ddev-selenium-standalone-chrome
22
repository: ddev/ddev-selenium-standalone-chrome
3-
version: 1.2.2
4-
install_date: "2025-06-30T10:08:54+02:00"
3+
version: 2.1.2
4+
install_date: "2026-03-24T18:22:50+01:00"
55
project_files:
66
- docker-compose.selenium-chrome.yaml
77
- config.selenium-standalone-chrome.yaml
88
global_files: []
9-
removal_actions:
10-
- |
11-
#ddev-nodisplay
12-
#ddev-description:Remove docker-compose.selenium-chrome_extras.yaml file
13-
if [ -f docker-compose.selenium-chrome_extras.yaml ]; then
14-
if grep -q '#ddev-generated' docker-compose.selenium-chrome_extras.yaml; then
15-
rm -f docker-compose.selenium-chrome_extras.yaml
16-
else
17-
echo "Unwilling to remove '$DDEV_APPROOT/.ddev/docker-compose.selenium-chrome_extras.yaml' because it does not have #ddev-generated in it; you can manually delete it if it is safe to delete."
18-
fi
19-
fi
9+
removal_actions: []

.ddev/commands/web/eslint

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@
77
## Example: "ddev eslint"
88
## ExecRaw: true
99

10+
set -eu -o pipefail
11+
1012
if "$DDEV_DOCROOT/core/node_modules/.bin/eslint" --version >/dev/null ; then
1113
# Configure prettier
1214
test -e .prettierrc.json || ln -s $DDEV_DOCROOT/core/.prettierrc.json .
1315
test -e .prettierignore || echo '*.yml' > .prettierignore
1416
# Change directory to the project root folder
15-
cd "$DDEV_DOCROOT/modules/custom/${DDEV_SITENAME//-/_}" || exit
17+
cd "$DDEV_DOCROOT/$DRUPAL_PROJECTS_PATH/${DDEV_SITENAME//-/_}" || exit
1618
"$DDEV_COMPOSER_ROOT/$DDEV_DOCROOT/core/node_modules/.bin/eslint" --config="../../../core/.eslintrc.passing.json" --no-error-on-unmatched-pattern --ignore-pattern="*.es6.js" --resolve-plugins-relative-to=$DDEV_COMPOSER_ROOT/$DDEV_DOCROOT/core --ext=.js,.yml . "$@"
1719
else
1820
echo "eslint is not available. You may need to 'ddev exec \"cd $DDEV_DOCROOT/core && yarn install\"'"

.ddev/commands/web/expand-composer-json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,17 @@
66
## Usage: expand-composer-json [flags] [PROJECT_NAME]
77
## Example: "ddev expand-composer-json ctools"
88
## ExecRaw: true
9+
## MutagenSync: true
10+
11+
set -eu -o pipefail
12+
13+
# Set the default core version.
14+
export DRUPAL_CORE=${DRUPAL_CORE:-^11}
915

1016
export _WEB_ROOT=$DDEV_DOCROOT
1117
cd "$DDEV_COMPOSER_ROOT" || exit
1218
curl -OL https://git.drupalcode.org/project/gitlab_templates/-/raw/default-ref/scripts/expand_composer_json.php
19+
_ddev_drupal_contrib_empty_composer=false
1320
if [[ ! -f composer.json ]]; then
1421
echo "{}" > composer.json
1522
_ddev_drupal_contrib_empty_composer=true

.ddev/commands/web/nightwatch

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@
77
## Example: "ddev nightwatch"
88
## ExecRaw: true
99

10-
yarn --cwd "$DDEV_DOCROOT/core" test:nightwatch "$DDEV_COMPOSER_ROOT/$DDEV_DOCROOT/modules/custom/" "$@"
10+
set -eu -o pipefail
11+
12+
yarn --cwd "$DDEV_DOCROOT/core" test:nightwatch "$DDEV_APPROOT/$DDEV_DOCROOT/$DRUPAL_PROJECTS_PATH/" "$@"

.ddev/commands/web/phpcbf

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@
77
## Example: "ddev phpcbf" or "ddev phpcbf -n"
88
## ExecRaw: true
99

10+
set -eu -o pipefail
11+
1012
if ! command -v phpcbf >/dev/null; then
1113
echo "phpcbf is not available. You may need to 'ddev composer install'"
1214
exit 1
1315
fi
14-
phpcbf -s --report-full --report-summary --report-source --ignore=*/.ddev/* "$@"
16+
test -e phpcs.xml.dist || curl -OL https://git.drupalcode.org/project/gitlab_templates/-/raw/default-ref/assets/phpcs.xml.dist
17+
phpcbf -s --report-full --report-summary --report-source $DDEV_DOCROOT/$DRUPAL_PROJECTS_PATH "$@"

.ddev/commands/web/phpcs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,11 @@
77
## Example: "ddev phpcs" or "ddev phpcs -n"
88
## ExecRaw: true
99

10+
set -eu -o pipefail
11+
1012
if ! command -v phpcs >/dev/null; then
1113
echo "phpcs is not available. You may need to 'ddev composer install'"
1214
exit 1
1315
fi
14-
phpcs -s --report-full --report-summary --report-source --ignore=*/.ddev/* "$@"
16+
test -e phpcs.xml.dist || curl -OL https://git.drupalcode.org/project/gitlab_templates/-/raw/default-ref/assets/phpcs.xml.dist
17+
phpcs -s --report-full --report-summary --report-source $DDEV_DOCROOT/$DRUPAL_PROJECTS_PATH --ignore=*/.ddev/* "$@"

.ddev/commands/web/phpstan

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
## Usage: phpstan [flags] [args]
77
## Example: "ddev phpstan" or "ddev phpstan -n"
88
## ExecRaw: true
9+
## MutagenSync: true
10+
11+
set -eu -o pipefail
912

1013
if ! command -v phpstan >/dev/null; then
1114
echo "phpstan is not available. You may need to 'ddev poser'"
@@ -16,4 +19,10 @@ test -e phpstan.neon || curl -OL https://git.drupalcode.org/project/gitlab_templ
1619
sed -i 's/BASELINE_PLACEHOLDER/phpstan-baseline.neon/g' phpstan.neon
1720
# Add an empty baseline file to ensure it exists.
1821
test -e phpstan-baseline.neon || touch phpstan-baseline.neon
19-
phpstan analyse "$@"
22+
23+
EXTENSION_DIRECTORY=$DDEV_DOCROOT/$DRUPAL_PROJECTS_PATH/${DDEV_SITENAME//-/_}
24+
cd "$EXTENSION_DIRECTORY" || exit 1
25+
# Ensure PHPStan configuration is symlinked from project root.
26+
ln -s $DDEV_DOCROOT/phpstan.neon 2>/dev/null || true
27+
ln -s $DDEV_DOCROOT/phpstan-baseline.neon 2>/dev/null || true
28+
phpstan analyze . "$@"

.ddev/commands/web/phpunit

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,29 @@
55
## Description: Run phpunit inside the web container
66
## Usage: phpunit [flags] [args]
77
## Example: "ddev phpunit" or "ddev phpunit --stop-on-failure"
8+
## Example: "ddev phpunit web/modules/custom/mymodule/tests/src/Unit/MyTest.php"
9+
## Example: "ddev phpunit --filter testMyFunction"
810
## ExecRaw: true
911

12+
set -eu -o pipefail
13+
1014
if ! command -v phpunit >/dev/null; then
1115
echo "phpunit is not available. You may need to 'ddev composer install'"
1216
exit 1
1317
fi
1418

1519
# CHECK for local config.
1620
if [ -f "phpunit.xml" ]; then
17-
# Defer to local config
18-
phpunit "$@"
21+
# Defer to local config
22+
phpunit "$@"
1923
else
20-
# Bootstrap Drupal tests and run all custom module tests.
21-
phpunit --bootstrap $PWD/$DDEV_DOCROOT/core/tests/bootstrap.php $DDEV_DOCROOT/modules/custom "$@"
24+
# Check if we are running a specific test or test folder.
25+
if [ $# -gt 0 ] && [ -e "$1" ]; then
26+
TEST_PATH="$1"
27+
shift
28+
phpunit --bootstrap $PWD/$DDEV_DOCROOT/core/tests/bootstrap.php "$TEST_PATH" "$@"
29+
else
30+
# Run all custom module tests.
31+
phpunit --bootstrap $PWD/$DDEV_DOCROOT/core/tests/bootstrap.php $DDEV_DOCROOT/$DRUPAL_PROJECTS_PATH "$@"
32+
fi
2233
fi

.ddev/commands/web/poser

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@
66
## Usage: poser [flags] [args]
77
## Example: "ddev poser" or "ddev poser --prefer-source"
88
## ExecRaw: true
9+
## MutagenSync: true
10+
11+
set -eu -o pipefail
912

1013
export COMPOSER=composer.contrib.json
11-
.ddev/commands/web/expand-composer-json "$DDEV_PROJECT_NAME"
14+
.ddev/commands/web/expand-composer-json
1215
composer install "$@"
1316
# The -f flag suppresses errors if lock file does not exist.
1417
rm -f composer.contrib.json composer.contrib.lock

0 commit comments

Comments
 (0)