Skip to content

Commit

Permalink
swallow deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed Sep 1, 2020
1 parent 8c63956 commit bba78ce
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions DeprecationErrorHandler/Deprecation.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@ public function __construct($message, array $trace, $file)
$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'];
Expand Down

0 comments on commit bba78ce

Please sign in to comment.