Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3cd929b

Browse files
soerenbernsteinnicolas-grekas
authored andcommitted
[PhpUnitBridge] fix disabling DeprecationErrorHandler using phpunit.xml file
1 parent e0e5e83 commit 3cd929b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@ public static function register($mode = 0)
5454
if (false === $mode) {
5555
$mode = getenv('SYMFONY_DEPRECATIONS_HELPER');
5656
}
57-
if (DeprecationErrorHandler::MODE_WEAK !== $mode && DeprecationErrorHandler::MODE_WEAK_VENDORS !== $mode && (!isset($mode[0]) || '/' !== $mode[0])) {
57+
if (DeprecationErrorHandler::MODE_DISABLED !== $mode
58+
&& DeprecationErrorHandler::MODE_WEAK !== $mode
59+
&& DeprecationErrorHandler::MODE_WEAK_VENDORS !== $mode
60+
&& (!isset($mode[0]) || '/' !== $mode[0])
61+
) {
5862
$mode = preg_match('/^[1-9][0-9]*$/', $mode) ? (int) $mode : 0;
5963
}
6064

0 commit comments

Comments
 (0)