Change record status: 
Project: 
Introduced in branch: 
10.0.x
Introduced in version: 
10.0.0
Description: 

Deprecation silencing in testing is now performed via Symfony 6.1 PHPUnit Bridge's own logic, and Drupal core's deprecationListenerTrait implementation was removed.

The regular expression patterns to be ignored during deprecation tests are now listed in the .deprecation-ignore.txt file in Drupal's core directory.

See https://symfony.com/doc/current/components/phpunit_bridge.html#ignoring-... for more information on the ignore file.

Drupal's own CI testing has been adjusted to seamlessly shift to use the new solution.

Projects running Drupal tests with specific deprecation requirements

Projects running Drupal tests on CI or locally, and that require overriding Drupal's core ignore file, can adjust their setup/CI scripts in order to use the new solution for their requirements.

In essence, to run deprecation testing with a different ignoreFile they will have to make sure that the environment variable SYMFONY_DEPRECATIONS_HELPER is set like

SYMFONY_DEPRECATIONS_HELPER=ignoreFile={deprecation_ignore_filename}

either in their phpunit.xml file or in the CI scripts they're using.

In case of no specific input, Drupal's core ignore file will be used.

Impacts: 
Site builders, administrators, editors
Module developers
Site templates, recipes and distribution developers