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

#57021

Replace __wakeup with __unserialize for object unserialization

Replace __wakeup with __unserialize for object unserialization

Replace __wakeup with __unserialize for object unserialization
@taylorotwell taylorotwell marked this pull request as draft September 12, 2025 14:33
@tontonsb
Copy link
Contributor

Un-deprecation is actively being discussed as it's not really a drop-in replacement. https://externals.io/message/128643

@jnoordsij
Copy link
Contributor

FYI: this has indeed been changed into a soft deprecation (see php/php-src#19966) from 8.5rc2 onwards. So although this still is an advisable change, it will not generate any runtime deprecation messages on PHP 8.5.

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