Skip to content

Commit 67739d2

Browse files
committed
suggest a non-deprecated function replacement
1 parent 81d760b commit 67739d2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Authorization/AccessDecisionManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function __construct(iterable $voters = [], string $strategy = self::STRA
5858
public function decide(TokenInterface $token, array $attributes, $object = null)
5959
{
6060
if (\count($attributes) > 1) {
61-
@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);
61+
@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);
6262
}
6363

6464
return $this->{$this->strategy}($token, $attributes, $object);

Authorization/AuthorizationChecker.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ final public function isGranted($attributes, $subject = null): bool
5656
if (!\is_array($attributes)) {
5757
$attributes = [$attributes];
5858
} else {
59-
@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);
59+
@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);
6060
}
6161

6262
return $this->accessDecisionManager->decide($token, $attributes, $subject);

0 commit comments

Comments
 (0)