lint/style/no-sleep-wakeup
In the modernize set. Unsafe fix: it can change behaviour. Gated by php-version.
What it does
Replace __sleep()/__wakeup() with __serialize()/__unserialize().
Configuration
[lint.rules]
"style/no-sleep-wakeup" = "error"
To skip it in some files, add an override or a @pun-ignore-file comment.
Options
| Name | Type | Allowed values | Default | Upstream name |
|---|---|---|---|---|
checks |
list |
sleep, wakeup |
["sleep", "wakeup"] |
None (Pun’s own) |
Replaces
modern_serialization_methods(php-cs-fixer, risky)SleepToSerialize(rector)WakeupToUnserialize(rector)
Merged rules
These old IDs are now this rule. A config that still names one stops with an error. See merged rules.
lint/classes/prefer-serialize-methodlint/classes/prefer-unserialize-method