From bba78ce46a13a8d761f6330c718924dc6ca7d3b0 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Mon, 31 Aug 2020 17:41:58 +0200 Subject: [PATCH] swallow deprecations --- DeprecationErrorHandler/Deprecation.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/DeprecationErrorHandler/Deprecation.php b/DeprecationErrorHandler/Deprecation.php index 62e09c46..daab2d2a 100644 --- a/DeprecationErrorHandler/Deprecation.php +++ b/DeprecationErrorHandler/Deprecation.php @@ -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'];