Skip to content
Esc
↑↓navigate↵open⌘Jpreview
On this page

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

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-method
  • lint/classes/prefer-unserialize-method

More lint/style rules · Edit this page

Last updated on

Was this page helpful?