Skip to content
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

Merged
merged 1 commit into from
May 31, 2023

Conversation

e-zannelli
Copy link
Contributor

A proposed fix for #162

@Kevinrob
Copy link
Owner

@e-zannelli Can you rebase it? We have now Gitub Actions with tests

@e-zannelli
Copy link
Contributor Author

Rebased 🙇

@Kevinrob
Copy link
Owner

Rebased 🙇

Thank you! The tests don't pass 😯

@e-zannelli
Copy link
Contributor Author

Ah, __serialize is a php 7.4 feature and you still support php 7.2

@e-zannelli
Copy link
Contributor Author

I restored compatibility with php <7.4 by implementing \Serializable interface, tests pass now.

Comment on lines +324 to +327
public function unserialize($data)
{
$this->__unserialize(unserialize($data));
}
Copy link
Owner

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.

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

@Kevinrob Kevinrob merged commit 0e12dcc into Kevinrob:master May 31, 2023
10 checks passed
@Kevinrob
Copy link
Owner

Kevinrob commented May 31, 2023

Thanks @e-zannelli !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants