-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use __serialize instead of __sleep on CacheEntry #163
use __serialize instead of __sleep on CacheEntry #163
Conversation
@e-zannelli Can you rebase it? We have now Gitub Actions with tests |
8598883
to
f914a07
Compare
Rebased 🙇 |
Thank you! The tests don't pass 😯 |
Ah, __serialize is a php 7.4 feature and you still support php 7.2 |
f914a07
to
222b2ed
Compare
I restored compatibility with php <7.4 by implementing \Serializable interface, tests pass now. |
public function unserialize($data) | ||
{ | ||
$this->__unserialize(unserialize($data)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of this function public function unserialize($data)
? I don't find any call to it and it doesn't seem to be a "magic" PHP function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's from PHPs legacy system for customized serialization, see: The Serializable interface
Thanks @e-zannelli ! |
A proposed fix for #162