Skip to content

Commit 645f62b

Browse files
authored
Migrate PHPUnit configuration across PHPUnit major versions (#907)
Maybe you'd prefer to do things differently, but this gets things working between PHPUnit 9/10/11 with a single `phpunit.xml`.
1 parent 861a2b1 commit 645f62b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.github/workflows/php.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ jobs:
6767
run: "composer require drupal/core-recommended:${{ matrix.drupal }} --with-all-dependencies --dev --no-update"
6868
- name: "Install dependencies"
6969
uses: "ramsey/composer-install@v3"
70+
- name: "Migrate PHPUnit configuration across PHPUnit major versions"
71+
run: |
72+
php vendor/bin/phpunit --migrate-configuration || true
73+
[ -f "phpunit.xml.bak" ] && diff -u phpunit.xml phpunit.xml.bak || true
7074
- name: "PHPUnit"
7175
run: "php vendor/bin/phpunit"
7276

0 commit comments

Comments
 (0)