Skip to content

Commit e215e4f

Browse files
committed
feature #20040 [Bridge/PhpUnit] Handle native E_DEPRECATED (nicolas-grekas)
This PR was merged into the 3.2-dev branch. Discussion ---------- [Bridge/PhpUnit] Handle native E_DEPRECATED | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - PHP native deprecations should also be caught. Commits ------- 90e8224 [Bridge/PhpUnit] Handle native E_DEPRECATED
2 parents 2318b60 + 90e8224 commit e215e4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public static function register($mode = 0)
6868
'other' => array(),
6969
);
7070
$deprecationHandler = function ($type, $msg, $file, $line, $context) use (&$deprecations, $getMode) {
71-
if (E_USER_DEPRECATED !== $type || DeprecationErrorHandler::MODE_DISABLED === $mode = $getMode()) {
71+
if ((E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type) || DeprecationErrorHandler::MODE_DISABLED === $mode = $getMode()) {
7272
return \PHPUnit_Util_ErrorHandler::handleError($type, $msg, $file, $line, $context);
7373
}
7474

0 commit comments

Comments
 (0)