8000 added a note about serialization · chtitux/symfony-docs@8f2687e · GitHub
[go: up one dir, main page]

Skip to content

Commit 8f2687e

Browse files
committed
added a note about serialization
1 parent 2b75669 commit 8f2687e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

book/security.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -900,6 +900,11 @@ custom user class is that it implements the :class:`Symfony\\Component\\Security
900900
interface. This means that your concept of a "user" can be anything, as long
901901
as it implements this interface.
902902

903+
.. note:
904+
905+
A user object must be serializable, and unserializable. For this reason, it is recommended that you turn on
906+
eager fetching for all relationships that involve a user object.
907+
903908
Next, configure an ``entity`` user provider, and point it to your ``User``
904909
class:
905910

0 commit comments

Comments
 (0)
0