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