diff options
author | Christian Flothmann <christian.flothmann@sensiolabs.de> | 2016-11-28 08:59:03 +0100 |
---|---|---|
committer | Christian Flothmann <christian.flothmann@sensiolabs.de> | 2016-12-07 09:55:32 +0100 |
commit | a39290c2fc59213b11f62bbce19e366ac69dbf8b (patch) | |
tree | b7621cb909b1756a5df39f05072b18ffebbb8fda /Core | |
parent | 63744a5bb1e02c4ce0e017d701882ac1587c79e0 (diff) | |
download | symfony-security-a39290c2fc59213b11f62bbce19e366ac69dbf8b.zip symfony-security-a39290c2fc59213b11f62bbce19e366ac69dbf8b.tar.gz symfony-security-a39290c2fc59213b11f62bbce19e366ac69dbf8b.tar.bz2 |
[Security] deprecate the RoleInterface
Diffstat (limited to 'Core')
-rw-r--r-- | Core/Authentication/Token/AbstractToken.php | 2 | ||||
-rw-r--r-- | Core/Authentication/Token/AnonymousToken.php | 8 | ||||
-rw-r--r-- | Core/Authentication/Token/PreAuthenticatedToken.php | 10 | ||||
-rw-r--r-- | Core/Authentication/Token/UsernamePasswordToken.php | 10 | ||||
-rw-r--r-- | Core/Role/Role.php | 3 | ||||
-rw-r--r-- | Core/Role/RoleInterface.php | 2 |
6 files changed, 18 insertions, 17 deletions
diff --git a/Core/Authentication/Token/AbstractToken.php b/Core/Authentication/Token/AbstractToken.php index 7538648..2f517f3 100644 --- a/Core/Authentication/Token/AbstractToken.php +++ b/Core/Authentication/Token/AbstractToken.php @@ -33,7 +33,7 @@ abstract class AbstractToken implements TokenInterface /** * Constructor. * - * @param RoleInterface[]|string[] $roles An array of roles + * @param (Role|string)[] $roles An array of roles * * @throws \InvalidArgumentException */ diff --git a/Core/Authentication/Token/AnonymousToken.php b/Core/Authentication/Token/AnonymousToken.php index 76c88ba..33b480c 100644 --- a/Core/Authentication/Token/AnonymousToken.php +++ b/Core/Authentication/Token/AnonymousToken.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Security\Core\Authentication\Token; -use Symfony\Component\Security\Core\Role\RoleInterface; +use Symfony\Component\Security\Core\Role\Role; /** * AnonymousToken represents an anonymous token. @@ -25,9 +25,9 @@ class AnonymousToken extends AbstractToken /** * Constructor. * - * @param string $secret A secret used to make sure the token is created by the app and not by a malicious client - * @param string|object $user The user can be a UserInterface instance, or an object implementing a __toString method or the username as a regular string - * @param RoleInterface[] $roles An array of roles + * @param string $secret A secret used to make sure the token is created by the app and not by a malicious client + * @param string|object $user The user can be a UserInterface instance, or an object implementing a __toString method or the username as a regular string + * @param Role[] $roles An array of roles */ public function __construct($secret, $user, array $roles = array()) { diff --git a/Core/Authentication/Token/PreAuthenticatedToken.php b/Core/Authentication/Token/PreAuthenticatedToken.php index b4b5e70..feb53cc 100644 --- a/Core/Authentication/Token/PreAuthenticatedToken.php +++ b/Core/Authentication/Token/PreAuthenticatedToken.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Security\Core\Authentication\Token; -use Symfony\Component\Security\Core\Role\RoleInterface; +use Symfony\Component\Security\Core\Role\Role; /** * PreAuthenticatedToken implements a pre-authenticated token. @@ -26,10 +26,10 @@ class PreAuthenticatedToken extends AbstractToken /** * Constructor. * - * @param string|object $user The user can be a UserInterface instance, or an object implementing a __toString method or the username as a regular string - * @param mixed $credentials The user credentials - * @param string $providerKey The provider key - * @param RoleInterface[]|string[] $roles An array of roles + * @param string|object $user The user can be a UserInterface instance, or an object implementing a __toString method or the username as a regular string + * @param mixed $credentials The user credentials + * @param string $providerKey The provider key + * @param (Role|string)[] $roles An array of roles */ public function __construct($user, $credentials, $providerKey, array $roles = array()) { diff --git a/Core/Authentication/Token/UsernamePasswordToken.php b/Core/Authentication/Token/UsernamePasswordToken.php index 33b00f0..a7d530c 100644 --- a/Core/Authentication/Token/UsernamePasswordToken.php +++ b/Core/Authentication/Token/UsernamePasswordToken.php @@ -11,7 +11,7 @@ namespace Symfony\Component\Security\Core\Authentication\Token; -use Symfony\Component\Security\Core\Role\RoleInterface; +use Symfony\Component\Security\Core\Role\Role; /** * UsernamePasswordToken implements a username and password token. @@ -26,10 +26,10 @@ class UsernamePasswordToken extends AbstractToken /** * Constructor. * - * @param string|object $user The username (like a nickname, email address, etc.), or a UserInterface instance or an object implementing a __toString method - * @param string $credentials This usually is the password of the user - * @param string $providerKey The provider key - * @param RoleInterface[]|string[] $roles An array of roles + * @param string|object $user The username (like a nickname, email address, etc.), or a UserInterface instance or an object implementing a __toString method + * @param string $credentials This usually is the password of the user + * @param string $providerKey The provider key + * @param (Role|string)[] $roles An array of roles * * @throws \InvalidArgumentException */ diff --git a/Core/Role/Role.php b/Core/Role/Role.php index 5b50981..7cb4698 100644 --- a/Core/Role/Role.php +++ b/Core/Role/Role.php @@ -12,8 +12,7 @@ namespace Symfony\Component\Security\Core\Role; /** - * Role is a simple implementation of a RoleInterface where the role is a - * string. + * Role is a simple implementation representing a role identified by a string. * * @author Fabien Potencier <fabien@symfony.com> */ diff --git a/Core/Role/RoleInterface.php b/Core/Role/RoleInterface.php index 3d4cbea..a0621ba 100644 --- a/Core/Role/RoleInterface.php +++ b/Core/Role/RoleInterface.php @@ -18,6 +18,8 @@ namespace Symfony\Component\Security\Core\Role; * supported by at least one AccessDecisionManager. * * @author Fabien Potencier <fabien@symfony.com> + * + * @deprecated The RoleInterface is deprecated since version 3.3 and will be removed in 4.0. Extend the Symfony\Component\Security\Core\Role\Role class instead. */ interface RoleInterface { |