8000 [Security][TokenInterface] Prepare for the new serialization mechanism · rubenrua/symfony@e6455ea · GitHub
[go: up one dir, main page]

Skip to content

Commit e6455ea

Browse files
fancywebRobin Chalas
authored and
Robin Chalas
committed
[Security][TokenInterface] Prepare for the new serialization mechanism
1 parent 4d9f5ee commit e6455ea

File tree

4 files changed

+8
-1
lines changed

4 files changed

+8
-1
lines changed

UPGRADE-4.3.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ Security
153153
```
154154

155155
* The `Argon2iPasswordEncoder` class has been deprecated, use `SodiumPasswordEncoder` instead.
156+
* Not implementing the methods `__serialize` and `__unserialize` in classes implementing
157+
the `TokenInterface` is deprecated
156158

157159
SecurityBundle
158160
--------------

UPGRADE-5.0.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,8 @@ Security
328328
```
329329

330330
* The `Argon2iPasswordEncoder` class has been removed, use `SodiumPasswordEncoder` instead.
331+
* Classes implementing the `TokenInterface` must implement the two new methods
332+
`__serialize` and `__unserialize`
331333

332334
SecurityBundle
333335
--------------

src/Symfony/Component/Security/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ CHANGELOG
2020
* Dispatch `InteractiveLoginEvent` on `security.interactive_login`
2121
* Dispatch `SwitchUserEvent` on `security.switch_user`
2222
* deprecated `Argon2iPasswordEncoder`, use `SodiumPasswordEncoder` instead
23+
* Added methods `__serialize` and `__unserialize` to the `TokenInterface`
2324

2425
4.2.0
2526
-----

src/Symfony/Component/Security/Core/Authentication/Token/TokenInterface.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
* @author Fabien Potencier <fabien@symfony.com>
2020
* @author Johannes M. Schmitt <schmittjoh@gmail.com>
2121
*
22-
* @method string[] getRoleNames() The associated roles - not implementing it is deprecated since Symfony 4.3
22+
* @method array __serialize() Returns all the necessary state of the object for serialization purposes - not implementing it is deprecated since Symfony 4.3
23+
* @method void __unserialize(array $data) Restores the object state from an array given by __serialize() - not implementing it is deprecated since Symfony 4.3
24+
* @method string[] getRoleNames() The associated roles - not implementing it is deprecated since Symfony 4.3
2325
*/
2426
interface TokenInterface extends \Serializable
2527
{

0 commit comments

Comments
 (0)
0