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

Skip to content

Commit da19998

Browse files
bug #28524 [PhpUnitBridge] fix disabling DeprecationErrorHandler using phpunit.xml file (soerenbernstein)
This PR was submitted for the master branch but it was squashed and merged into the 3.4 branch instead (closes #28524). Discussion ---------- [PhpUnitBridge] fix disabling DeprecationErrorHandler using phpunit.xml file Fixing #28519 | Q | A | ------------- | --- | Branch? | master | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | don't know | Fixed tickets | #28519 | License | MIT Commits ------- 3cd929b [PhpUnitBridge] fix disabling DeprecationErrorHandler using phpunit.xml file
2 parents e0e5e83 + 3cd929b commit da19998

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)