mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
[PR #8895] Implement __serialize() and __unserialize() #11236
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/doctrine/orm/pull/8895
State: closed
Merged: Yes
The
Serializableinterface is deprecated in favor of the magic methods__serialize()and__unserialize(). PHP 8.1 will trigger a deprecation warning if a class implementsSerializablebut not those two magic methods.This PR addresses this issue by adding
__serialize()and__unserialize()to theSequenceGeneratorclass.This does however change the serialized string on PHP 7.4 and above. I don't know if that is a problem.