diff --git a/composer.json b/composer.json index f56ace222..1910efdac 100755 --- a/composer.json +++ b/composer.json @@ -11,7 +11,8 @@ "ext-zlib": "*", "ext-apcu": "*", "psr/log": "*", - "phpunit/phpunit": "^9.6" + "phpunit/phpunit": "^9.6", + "symfony/phpunit-bridge": "^7.0" }, "autoload": { "files": ["autoload.php"] diff --git a/tests/bootstrap.php b/tests/bootstrap.php index b54372e08..5f83a32ec 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -8,6 +8,8 @@ * file that was distributed with this source code. */ +use Symfony\Bridge\PhpUnit\DeprecationErrorHandler; + // setup expected test environment (per check_configuration.php) ini_set('magic_quotes_runtime', 'off'); ini_set('session.auto_start', 'off'); @@ -65,3 +67,7 @@ function fix_linebreaks($content) { return str_replace(array("\r\n", "\n", "\r"), "\n", $content); } + +if ('disabled' !== getenv('SYMFONY_DEPRECATIONS_HELPER')) { + DeprecationErrorHandler::register(getenv('SYMFONY_DEPRECATIONS_HELPER')); +}