diff --git a/UPGRADE-4.3.md b/UPGRADE-4.3.md index 873dc68256..9e19ba0dcb 100644 --- a/UPGRADE-4.3.md +++ b/UPGRADE-4.3.md @@ -153,6 +153,8 @@ Security ``` * The `Argon2iPasswordEncoder` class has been deprecated, use `SodiumPasswordEncoder` instead. + * Not implementing the methods `__serialize` and `__unserialize` in classes implementing + the `TokenInterface` is deprecated SecurityBundle -------------- diff --git a/UPGRADE-5.0.md b/UPGRADE-5.0.md index e90d60b60e..bac5275363 100644 --- a/UPGRADE-5.0.md +++ b/UPGRADE-5.0.md @@ -328,6 +328,8 @@ Security ``` * The `Argon2iPasswordEncoder` class has been removed, use `SodiumPasswordEncoder` instead. + * Classes implementing the `TokenInterface` must implement the two new methods + `__serialize` and `__unserialize` SecurityBundle -------------- diff --git a/src/Symfony/Component/Security/CHANGELOG.md b/src/Symfony/Component/Security/CHANGELOG.md index 42aca94dd0..69f4c6301a 100644 --- a/src/Symfony/Component/Security/CHANGELOG.md +++ b/src/Symfony/Component/Security/CHANGELOG.md @@ -20,6 +20,7 @@ CHANGELOG * Dispatch `InteractiveLoginEvent` on `security.interactive_login` * Dispatch `SwitchUserEvent` on `security.switch_user` * deprecated `Argon2iPasswordEncoder`, use `SodiumPasswordEncoder` instead + * Added methods `__serialize` and `__unserialize` to the `TokenInterface` 4.2.0 ----- diff --git a/src/Symfony/Component/Security/Core/Authentication/Token/TokenInterface.php b/src/Symfony/Component/Security/Core/Authentication/Token/TokenInterface.php index 4d8c2522ab..80ddca19db 100644 --- a/src/Symfony/Component/Security/Core/Authentication/Token/TokenInterface.php +++ b/src/Symfony/Component/Security/Core/Authentication/Token/TokenInterface.php @@ -19,7 +19,9 @@ use Symfony\Component\Security\Core\Role\Role; * @author Fabien Potencier * @author Johannes M. Schmitt * - * @method string[] getRoleNames() The associated roles - not implementing it is deprecated since Symfony 4.3 + * @method array __serialize() Returns all the necessary state of the object for serialization purposes - not implementing it is deprecated since Symfony 4.3 + * @method void __unserialize(array $data) Restores the object state from an array given by __serialize() - not implementing it is deprecated since Symfony 4.3 + * @method string[] getRoleNames() The associated roles - not implementing it is deprecated since Symfony 4.3 */ interface TokenInterface extends \Serializable {