[wp-trac] [WordPress Trac] #63962: PHP 8.5: Fix deprecation notices for __sleep and __wakeup magic methods

WordPress Trac noreply at wordpress.org
Tue Sep 23 20:22:15 UTC 2025


#63962: PHP 8.5: Fix deprecation notices for __sleep and __wakeup magic methods
-----------------------------+--------------------------------
 Reporter:  TobiasBg         |       Owner:  SergeyBiryukov
     Type:  defect (bug)     |      Status:  closed
 Priority:  normal           |   Milestone:  6.9
Component:  General          |     Version:
 Severity:  normal           |  Resolution:  fixed
 Keywords:  php85 has-patch  |     Focuses:  php-compatibility
-----------------------------+--------------------------------

Comment (by dmsnell):

 Thanks all for getting this updated and merged.

 One question I have about the change: is it possible to have accomplished
 it without adding a new array of `phpcs:ignore` comments? Do we not have a
 mechanism to add the excludes externally from the source code in some
 PHPCS configuration?

 This raises another question: if we know it’s important to provide these
 magic methods to prevent unintentional security issues, why are we having
 our automations reject people’s work when they add them?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/63962#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list