By mondrake on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
11.5.x
Introduced in version:
11.5.0
Issue links:
Description:
The SYMFONY_DEPRECATIONS_HELPER environment variable is no longer used to setup test runs' deprecation reporting, and its use is deprecated.
Its logic has been replaced by the DeprecationHandler extension, that needs to be configured in phpunit.xml as follows:
<extensions>
<!-- Deprecation handler.
This extension allows to ignore some deprecations on the project overall,
and/or to enable the Symfony debug classloader to trigger deprecations
while checking class parameters and return types at class loading time.
The configuration defined here can be overridden by defining the
environment variable DRUPAL_DEPRECATION_FILTER_CONFIG whose value must be
a JSON string containing an array with the same parameter names as keys.
For example,
DRUPAL_DEPRECATION_FILTER_CONFIG='{"enableDebugClassLoader":false}'
-->
<bootstrap class="Drupal\TestTools\Extension\DeprecationBridge\DeprecationHandler">
<!-- Set to true to enable project level deprecation ignore patterns.
The deprecations ignored with this mechanism are not relayed to PHPUnit
for processing. -->
<parameter name="enableProjectIgnores" value="true"/>
<!-- The path to a file containing the deprecation ignore patterns.
Relative paths are resolved against Drupal's root directory. -->
<parameter name="projectIgnoreFile" value="core/.deprecation-ignore.txt"/>
<!-- Set to true to enable Symfony's DebugClassLoader.
See https://github.com/symfony/error-handler -->
<parameter name="enableDebugClassLoader" value="true"/>
</bootstrap>
....
</extensions>
Impacts:
Module developers