minor #31011 [Security][TokenInterface] Prepare for the new serialization mechanism (fancyweb)

This PR was merged into the 4.3-dev branch.

Discussion
----------

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

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | yes
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Continuation of https://github.com/symfony/symfony/pull/30965

Commits
-------

e6455ea2d8 [Security][TokenInterface] Prepare for the new serialization mechanism
This commit is contained in:
Robin Chalas 2019-04-10 18:09:22 +02:00
commit a7ce547fdb
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
{