8000 minor #35447 [Security] suggest a non-deprecated function replacement… · symfony/symfony@c08fabe · GitHub
[go: up one dir, main page]

Skip to content

Commit c08fabe

Browse files
minor #35447 [Security] suggest a non-deprecated function replacement (xabbuh)
This PR was merged into the 4.4 branch. Discussion ---------- [Security] suggest a non-deprecated function replacement | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #35437 | License | MIT | Doc PR | Commits ------- 731730f suggest a non-deprecated function replacement
2 parents a3acdbd + 731730f commit c08fabe

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Symfony/Component/Security/Core/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);

src/Symfony/Component/Security/Core/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)
0