Skip to content

Conversation

arshidkv12
Copy link
Contributor

The legacy __wakeup() method is deprecated as of PHP 8.5 in favor of __unserialize().
These newer methods provide more flexible and explicit control over object unserialization.

https://wiki.php.net/rfc/deprecations_php_8_5#deprecate_the_sleep_and_wakeup_magic_methods

#57018

'limiterName',
'shouldRelease',
'limiterName' => $this->limiterName,
'shouldRelease' => $this->shouldRelease,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should take the opportunity to add the $releaseAfter property.

It was added in PR #55671 but missed being added on the serialization at the time.

@riyuk
Copy link
Contributor

riyuk commented Sep 11, 2025

imo it should not target 12.x

@rodrigopedra
Copy link
Contributor

imo it should not target 12.x

That is right, especially as one could be overriding __sleep() or __wakeup() on a user-land model with custom logic and be calling parent::__wakeup() for example.

@arshidkv12 arshidkv12 changed the base branch from 12.x to master September 12, 2025 01:39
@arshidkv12 arshidkv12 changed the title Replace __wakeup with __unserialize (deprecated in PHP 8.5) [13.x] Replace __wakeup with __unserialize (deprecated in PHP 8.5) Sep 12, 2025
@arshidkv12 arshidkv12 closed this Sep 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants