Skip to content

Commit

Permalink
[test] add symfony/phpunit-bridge because of depr. error handler
Browse files Browse the repository at this point in the history
  • Loading branch information
connorhu committed Dec 20, 2023
1 parent 710ebff commit 69e489a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
6 changes: 6 additions & 0 deletions tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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'));
}

0 comments on commit 69e489a

Please sign in to comment.