From 1114ea84875a2ced6cc114266564c0e22870cf06 Mon Sep 17 00:00:00 2001 From: Antoine Lamirault Date: Sun, 23 Oct 2022 00:19:50 +0200 Subject: [PATCH] [Security][Serializer] Add missing args to trigger_deprecation --- .../Security/Core/Authorization/AuthorizationChecker.php | 2 +- src/Symfony/Component/Security/Http/Firewall/AccessListener.php | 2 +- .../Component/Serializer/Normalizer/ArrayDenormalizer.php | 2 +- .../Serializer/Tests/Normalizer/ArrayDenormalizerTest.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/Security/Core/Authorization/AuthorizationChecker.php b/src/Symfony/Component/Security/Core/Authorization/AuthorizationChecker.php index 2326690e601bc..82441c08d4571 100644 --- a/src/Symfony/Component/Security/Core/Authorization/AuthorizationChecker.php +++ b/src/Symfony/Component/Security/Core/Authorization/AuthorizationChecker.php @@ -80,7 +80,7 @@ final public function isGranted($attribute, $subject = null): bool // @deprecated since Symfony 5.4 if ($this->alwaysAuthenticate || !$authenticated = $token->isAuthenticated(false)) { if (!($authenticated ?? true)) { - trigger_deprecation('symfony/core', '5.4', 'Returning false from "%s()" is deprecated, return null from "getUser()" instead.'); + trigger_deprecation('symfony/core', '5.4', 'Returning false from "%s::isAuthenticated()" is deprecated, return null from "getUser()" instead.', get_debug_type($token)); } $this->tokenStorage->setToken($token = $this->authenticationManager->authenticate($token)); } diff --git a/src/Symfony/Component/Security/Http/Firewall/AccessListener.php b/src/Symfony/Component/Security/Http/Firewall/AccessListener.php index e5050bd3def8a..8bea8564ef65a 100644 --- a/src/Symfony/Component/Security/Http/Firewall/AccessListener.php +++ b/src/Symfony/Component/Security/Http/Firewall/AccessListener.php @@ -114,7 +114,7 @@ public function authenticate(RequestEvent $event) // @deprecated since Symfony 5.4 if (method_exists($token, 'isAuthenticated') && !$token->isAuthenticated(false)) { - trigger_deprecation('symfony/core', '5.4', 'Returning false from "%s()" is deprecated, return null from "getUser()" instead.'); + trigger_deprecation('symfony/core', '5.4', 'Returning false from "%s::isAuthenticated()" is deprecated, return null from "getUser()" instead.', get_debug_type($token)); if ($this->authManager) { $token = $this->authManager->authenticate($token); diff --git a/src/Symfony/Component/Serializer/Normalizer/ArrayDenormalizer.php b/src/Symfony/Component/Serializer/Normalizer/ArrayDenormalizer.php index cd90ac68191ae..55c4233fef0fe 100644 --- a/src/Symfony/Component/Serializer/Normalizer/ArrayDenormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/ArrayDenormalizer.php @@ -89,7 +89,7 @@ public function setSerializer(SerializerInterface $serializer) } if (Serializer::class !== debug_backtrace()[1]['class'] ?? null) { - trigger_deprecation('symfony/serializer', '5.3', 'Calling "%s" is deprecated. Please call setDenormalizer() instead.'); + trigger_deprecation('symfony/serializer', '5.3', 'Calling "%s()" is deprecated. Please call setDenormalizer() instead.', __METHOD__); } $this->setDenormalizer($serializer); diff --git a/src/Symfony/Component/Serializer/Tests/Normalizer/ArrayDenormalizerTest.php b/src/Symfony/Component/Serializer/Tests/Normalizer/ArrayDenormalizerTest.php index 1b6b11a61def1..7b5b455c4ba5c 100644 --- a/src/Symfony/Component/Serializer/Tests/Normalizer/ArrayDenormalizerTest.php +++ b/src/Symfony/Component/Serializer/Tests/Normalizer/ArrayDenormalizerTest.php @@ -89,7 +89,7 @@ public function testDenormalizeLegacy() $denormalizer = new ArrayDenormalizer(); - $this->expectDeprecation('Since symfony/serializer 5.3: Calling "%s" is deprecated. Please call setDenormalizer() instead.'); + $this->expectDeprecation('Since symfony/serializer 5.3: Calling "Symfony\Component\Serializer\Normalizer\ArrayDenormalizer::setSerializer()" is deprecated. Please call setDenormalizer() instead.'); $denormalizer->setSerializer($serializer); $result = $denormalizer->denormalize( pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy