Skip to content

Commit 1067ead

Browse files
committed
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.
1 parent 856c127 commit 1067ead

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Authentication/Token/AbstractToken.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public function __construct(array $roles = array())
4343
if (is_string($role)) {
4444
$role = new Role($role);
4545
} elseif (!$role instanceof RoleInterface) {
46-
throw new \InvalidArgumentException(sprintf('$roles must be an array of strings, or RoleInterface instances, but got %s.', gettype($role)));
46+
throw new \InvalidArgumentException(sprintf('$roles must be an array of strings, Role instances or RoleInterface instances, but got %s.', gettype($role)));
4747
}
4848

4949
$this->roles[] = $role;

0 commit comments

Comments
 (0)