diff --git a/Transport/Serialization/PhpSerializer.php b/Transport/Serialization/PhpSerializer.php index f9cd992c..438fc1a1 100644 --- a/Transport/Serialization/PhpSerializer.php +++ b/Transport/Serialization/PhpSerializer.php @@ -81,7 +81,7 @@ private function safelyUnserialize(string $contents): Envelope $prevUnserializeHandler = ini_set('unserialize_callback_func', self::class.'::handleUnserializeCallback'); } $prevErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context = []) use (&$prevErrorHandler) { - if (__FILE__ === $file) { + if (__FILE__ === $file && !\in_array($type, [\E_DEPRECATED, \E_USER_DEPRECATED], true)) { throw new \ErrorException($msg, 0, $type, $file, $line); }