10000 Check for RoleInterface instead of Role object · symfony/symfony@5aae161 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5aae161

Browse files
committed
Check for RoleInterface instead of Role object
It should not be necessary to extend the Core Role object when the RoleInterface is implemented.
1 parent ef29276 commit 5aae161

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Symfony/Component/Security/Acl/Domain/RoleSecurityIdentity.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
namespace Symfony\Component\Security\Acl\Domain;
1313

1414
use Symfony\Component\Security\Acl\Model\SecurityIdentityInterface;
15-
use Symfony\Component\Security\Core\Role\Role;
15+
use Symfony\Component\Security\Core\Role\RoleInterface;
1616

1717
/**
1818
* A SecurityIdentity implementation for roles
@@ -30,7 +30,7 @@ final class RoleSecurityIdentity implements SecurityIdentityInterface
3030
*/
3131
public function __construct($role)
3232
{
33-
if ($role instanceof Role) {
33+
if ($role instanceof RoleInterface) {
3434
$role = $role->getRole();
3535
}
3636

0 commit comments

Comments
 (0)
0