Introduce PHPUNIT_FAIL_ON_PHPUNIT_DEPRECATION

Migrated issue

Reported by: mondrake

Related to !371 (merged)

Problem/Motivation

PHPUnit 11 separated reporting/failing on PHP deprecations vs on PHPUnit internal ones.

PHP deprecations use the @trigger_error('...', E_USER_DEPRECATED); mechanism; PHPUnit internal use PHPUnit's event system. The two streams are reported separately in PHPUnit CLI with two specific arguments, --fail-on-deprecation and --fail-on-phpunit-deprecation.

run-tests.sh by default sets both options; in core, the PHPUNIT_FAIL_ON_PHPUNIT_DEPRECATION environment variable can be used to disable PHPUnit deprecations while keeping the PHP ones failing the tests.

See https://git.drupalcode.org/project/drupal/-/blob/11.x/.gitlab-ci.yml?ref_type=heads#L70

Proposed resolution

Introduce the same variable in the template.
Default value to be discussed.

Remaining tasks

User interface changes

API changes

Data model changes

Assignee Loading
Time tracking Loading