Skip to content

Commit c0a707f

Browse files
committed
feature #37718 [Security] class Security implements AuthorizationCheckerInterface (SimonHeimberg)
This PR was merged into the 5.2-dev branch. Discussion ---------- [Security] class Security implements AuthorizationCheckerInterface The class has the method of AuthorizationCheckerInterface already. | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tickets | <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead --> | License | MIT | Doc PR | <!-- required for new features --> The class Security has the method for interface AuthorizationCheckerInterface already. By implementing the interface, Security can be passed to methods typehinted with AuthorizationCheckerInterface. Commits ------- cea6ebd [Security] class Security implements AuthorizationCheckerInterface
2 parents 6d2ee19 + cea6ebd commit c0a707f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Symfony/Component/Security/Core/Security.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@
1313

1414
use Psr\Container\ContainerInterface;
1515
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
16+
use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface;
1617
use Symfony\Component\Security\Core\User\UserInterface;
1718

1819
/**
1920
* Helper class for commonly-needed security tasks.
2021
*
2122
* @final
2223
*/
23-
class Security
24+
class Security implements AuthorizationCheckerInterface
2425
{
2526
const ACCESS_DENIED_ERROR = '_security.403_error';
2627
const AUTHENTICATION_ERROR = '_security.last_error';

0 commit comments

Comments
 (0)