From 731730fe2f3f407063aed5a9a6066d52d339761c Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Thu, 23 Jan 2020 10:45:54 +0100 Subject: [PATCH] suggest a non-deprecated function replacement --- .../Security/Core/Authorization/AccessDecisionManager.php | 2 +- .../Security/Core/Authorization/AuthorizationChecker.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php b/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php index dd1009142b..19dad6889b 100644 --- a/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php +++ b/src/Symfony/Component/Security/Core/Authorization/AccessDecisionManager.php @@ -58,7 +58,7 @@ class AccessDecisionManager implements AccessDecisionManagerInterface public function decide(TokenInterface $token, array $attributes, $object = null) { if (\count($attributes) > 1) { - @trigger_error(sprintf('Passing more than one Security attribute to %s() is deprecated since Symfony 4.4. Use multiple decide() calls or the expression language (e.g. "has_role(...) or has_role(...)") instead.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('Passing more than one Security attribute to %s() is deprecated since Symfony 4.4. Use multiple decide() calls or the expression language (e.g. "is_granted(...) or is_granted(...)") instead.', __METHOD__), E_USER_DEPRECATED); } return $this->{$this->strategy}($token, $attributes, $object); diff --git a/src/Symfony/Component/Security/Core/Authorization/AuthorizationChecker.php b/src/Symfony/Component/Security/Core/Authorization/AuthorizationChecker.php index a17ef2337c..21f06a1a66 100644 --- a/src/Symfony/Component/Security/Core/Authorization/AuthorizationChecker.php +++ b/src/Symfony/Component/Security/Core/Authorization/AuthorizationChecker.php @@ -56,7 +56,7 @@ class AuthorizationChecker implements AuthorizationCheckerInterface if (!\is_array($attributes)) { $attributes = [$attributes]; } else { - @trigger_error(sprintf('Passing an array of Security attributes to %s() is deprecated since Symfony 4.4. Use multiple isGranted() calls or the expression language (e.g. "has_role(...) or has_role(...)") instead.', __METHOD__), E_USER_DEPRECATED); + @trigger_error(sprintf('Passing an array of Security attributes to %s() is deprecated since Symfony 4.4. Use multiple isGranted() calls or the expression language (e.g. "is_granted(...) or is_granted(...)") instead.', __METHOD__), E_USER_DEPRECATED); } return $this->accessDecisionManager->decide($token, $attributes, $subject);