Skip to content

Commit 6e827ff

Browse files
committed
Set SYMFONY_DEPRECATIONS_HELPER=disabled for PHPUnit
The Symfony PHPUnit Bridge was causing exit code 1 even when all tests passed, due to deprecation notices in Drupal core and contrib modules. Setting SYMFONY_DEPRECATIONS_HELPER=disabled prevents deprecation tracking from affecting the test exit code. This is appropriate for CI testing where the focus is on test assertions passing, not tracking upstream deprecations.
1 parent efef1b0 commit 6e827ff

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

run-tests.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ docker exec -t drupal bash -c "mkdir -p /var/www/html/web/sites/simpletest && ch
3232
docker exec -u docker -t drupal bash -c 'sed -i "s#http://localgov.lndo.site#http://drupal#" /var/www/html/phpunit.xml.dist'
3333
# Use PHPUnit directly instead of Paratest to avoid JUnit XML parsing bugs
3434
# See: https://github.com/localgovdrupal/localgov_subsites/issues/140
35-
docker exec -u docker -t drupal bash -c "cd /var/www/html && ./bin/phpunit"
35+
# Set SYMFONY_DEPRECATIONS_HELPER=disabled to prevent deprecation notices from causing test failures
36+
# Drupal core and contrib modules have many deprecations that don't affect test validity
37+
docker exec -u docker -t drupal bash -c "cd /var/www/html && SYMFONY_DEPRECATIONS_HELPER=disabled ./bin/phpunit"
3638
if [ $? -ne 0 ]; then
3739
((RESULT++))
3840
fi

0 commit comments

Comments
 (0)