-
Hi, "Serialization is not supported. Use getPointer() to get a pointer to this file and serialize it instead." The solution is add custom serialization to User entity (without "avatar" FileInterface field) as:
} It is good solution? Do you have any other ideas to resolve the problem? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
To me, that's still absolutely necessary even without This is not specific to |
Beta Was this translation helpful? Give feedback.
To me, that's still absolutely necessary even without
rekalogika/file
. Without__serialize
&__unserialize
, Symfony will serialize the completeUser
entity, along with its entire related entities, to the session, even though the authentication layer only needs theid
, and it will refresh the entity from the database anyway.This is not specific to
rekalogika/file
, but applies to all cases where something preventsUser
from being serialized, including other file upload frameworks. But probably a good idea to add to our docs. Thanks.