[wp-trac] [WordPress Trac] #56511: PHP 8.2 Deprecated notices

WordPress Trac noreply at wordpress.org
Mon Sep 5 08:33:45 UTC 2022


#56511: PHP 8.2 Deprecated notices
-------------------------+-----------------------------
 Reporter:  dunhakdis    |      Owner:  (none)
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:  Awaiting Review
Component:  Database     |    Version:  6.0.2
 Severity:  normal       |   Keywords:  needs-patch
  Focuses:               |
-------------------------+-----------------------------
 Getting the following deprecated issues on PHP 8.2.0-dev

 {{{
 Deprecated: Creation of dynamic property wpdb::$actionscheduler_actions is
 deprecated in /usr/local/var/www/wordpress/wp-includes/wp-db.php on line
 760

 Deprecated: Creation of dynamic property wpdb::$actionscheduler_claims is
 deprecated in /usr/local/var/www/wordpress/wp-includes/wp-db.php on line
 760

 Deprecated: Creation of dynamic property wpdb::$actionscheduler_groups is
 deprecated in /usr/local/var/www/wordpress/wp-includes/wp-db.php on line
 760

 Deprecated: Creation of dynamic property wpdb::$actionscheduler_logs is
 deprecated in /usr/local/var/www/wordpress/wp-includes/wp-db.php on line
 760
 }}}


 Seems like the dynamic creation of properties in class will be deprecated
 in PHP 8.2 and might be removed in the near future:
 https://php.watch/versions/8.2/dynamic-properties-deprecated

 Adding #[AllowDynamicProperties] removes the deprecated notices.

 For example:

 {{{#!php
 <?php
 #[AllowDynamicProperties]
 class wpdb {
 ...
 }}}

 Thanks!

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/56511>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list