bug #38020 [PhpUnitBridge] swallow deprecations (xabbuh)

This PR was merged into the 4.4 branch.

Discussion
----------

[PhpUnitBridge] swallow deprecations

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

Commits
-------

f0067c106c swallow deprecations
This commit is contained in:
Fabien Potencier 2020-09-01 12:08:42 +02:00
commit 8ec0e588c3
1 changed files with 2 additions and 0 deletions

View File

@ -62,7 +62,9 @@ class Deprecation
$this->triggeringFile = $file;
if (isset($line['object']) || isset($line['class'])) {
if (isset($line['class']) && 0 === strpos($line['class'], SymfonyTestsListenerFor::class)) {
set_error_handler(function () {});
$parsedMsg = unserialize($this->message);
restore_error_handler();
$this->message = $parsedMsg['deprecation'];
$this->originClass = $parsedMsg['class'];
$this->originMethod = $parsedMsg['method'];