Skip to content

Commit 0a4f363

Browse files
[Config][Messenger][Security] Don't turn deprecations into exceptions when unserializing
1 parent 6b76343 commit 0a4f363

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ResourceCheckerConfigCache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ private function safelyUnserialize(string $file)
156156
$signalingException = new \UnexpectedValueException();
157157
$prevUnserializeHandler = ini_set('unserialize_callback_func', self::class.'::handleUnserializeCallback');
158158
$prevErrorHandler = set_error_handler(function ($type, $msg, $file, $line, $context = []) use (&$prevErrorHandler, $signalingException) {
159-
if (__FILE__ === $file) {
159+
if (__FILE__ === $file && !\in_array($type, [\E_DEPRECATED, \E_USER_DEPRECATED], true)) {
160160
throw $signalingException;
161161
}
162162

0 commit comments

Comments
 (0)