explain that a role can be an instance of Role
Only mentioning the RoleInterface seems to be confusing as it is deprecated since Symfony 3.3.
This commit is contained in:
parent
d0aa4d93dd
commit
0068968dcc
@ -43,7 +43,7 @@ abstract class AbstractToken implements TokenInterface
|
||||
if (is_string($role)) {
|
||||
$role = new Role($role);
|
||||
} elseif (!$role instanceof RoleInterface) {
|
||||
throw new \InvalidArgumentException(sprintf('$roles must be an array of strings, or RoleInterface instances, but got %s.', gettype($role)));
|
||||
throw new \InvalidArgumentException(sprintf('$roles must be an array of strings, Role instances or RoleInterface instances, but got %s.', gettype($role)));
|
||||
}
|
||||
|
||||
$this->roles[] = $role;
|
||||
|
Reference in New Issue
Block a user