Skip to content
Permalink
Browse files

bug #30490 Don't resolve the Deprecation error handler mode until a d…

…eprecation is triggered (Emmanuel BORGES)

This PR was squashed before being merged into the 4.2 branch (closes #30490).

Discussion
----------

Don't resolve the Deprecation error handler mode until a deprecation is triggered

| Q             | A
| ------------- | ---
| Branch?       | 4.2
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #30047
| License       | MIT

Don't resolve the Deprecation error handler mode until a deprecation is triggered

Commits
-------

f3a5b74 Don't resolve the Deprecation error handler mode until a deprecation is triggered
  • Loading branch information...
nicolas-grekas committed Mar 8, 2019
2 parents eb2972e + f3a5b74 commit bfcc607b189b24dd7d40b59e43a3a4a7f48d2275
Showing with 1 addition and 2 deletions.
  1. +1 −2 src/Symfony/Bridge/PhpUnit/DeprecationErrorHandler.php
@@ -105,8 +105,7 @@ public static function register($mode = 0)
'remaining vendor' => array(),
];
$deprecationHandler = function ($type, $msg, $file, $line, $context = array()) use (&$deprecations, $getMode, $UtilPrefix, $inVendors) {
$mode = $getMode();
if ((E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type) || DeprecationErrorHandler::MODE_DISABLED === $mode) {
if ((E_USER_DEPRECATED !== $type && E_DEPRECATED !== $type) || DeprecationErrorHandler::MODE_DISABLED === $mode = $getMode()) {
$ErrorHandler = $UtilPrefix.'ErrorHandler';
return $ErrorHandler::handleError($type, $msg, $file, $line, $context);

0 comments on commit bfcc607

Please sign in to comment.
You can’t perform that action at this time.