You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What about classes extending stdClass and also defining other properties, public or not, with getters/setters? Just casting the object with as it is done with stdClass wouldn't fully work, isn't it?
I am not 100 percent sure what you mean. A getter/setter does not change anything for unknown properties during serialize/unserialize. The only possible solution would be magic getters/setters to set the unknown property.
But I have not tested it yet and do not even know if symfony serializer works with __get and __set.
Could you provide an example what you mean plz?
Symfony version(s) affected
Description
The serialize and unserialize for stdClass works because of this code in the class ObjectNormalizer + method extractAttributes
but this code does not check for classes, that are extending stdClass.
How to reproduce
Possible Solution
Better would be some additional code like this:
Additional Context
No response
The text was updated successfully, but these errors were encountered: