[Security][TokenInterface] Prepare for the new serialization mechanism

This commit is contained in:
Thomas Calvet 2019-04-08 14:17:08 +02:00 committed by Robin Chalas
parent 4d9f5ee823
commit e6455ea2d8
4 changed files with 8 additions and 1 deletions

View File

@ -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
--------------

View File

@ -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
--------------

View File

@ -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
-----

View File

@ -19,7 +19,9 @@ use Symfony\Component\Security\Core\Role\Role;
* @author Fabien Potencier <fabien@symfony.com>
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
*
* @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
{