[PhpUnitBridge] fix bad detection of unsilenced deprecations

This commit is contained in:
Nicolas Grekas 2020-05-19 10:04:03 +02:00
parent 7ee33f9e82
commit 9d5bb11ec9
2 changed files with 3 additions and 3 deletions

View File

@ -140,7 +140,7 @@ class DeprecationErrorHandler
$Test = $UtilPrefix.'Test';
if (0 !== error_reporting()) {
if (error_reporting() & $type) {
$group = 'unsilenced';
} elseif (0 === strpos($method, 'testLegacy')
|| 0 === strpos($method, 'provideLegacy')
@ -292,7 +292,7 @@ class DeprecationErrorHandler
return \call_user_func(DeprecationErrorHandler::getPhpUnitErrorHandler(), $type, $msg, $file, $line, $context);
}
$deprecations[] = array(error_reporting(), $msg, $file);
$deprecations[] = array(error_reporting() & $type, $msg, $file);
return null;
});

View File

@ -352,7 +352,7 @@ class SymfonyTestsListenerTrait
if (\is_array($parsedMsg)) {
$msg = $parsedMsg['deprecation'];
}
if (error_reporting()) {
if (error_reporting() & $type) {
$msg = 'Unsilenced deprecation: '.$msg;
}
$this->gatheredDeprecations[] = $msg;