[wp-trac] [WordPress Trac] #58087: Refactor WP_Term to ensure better compatibility with PHP 8.2

WordPress Trac noreply at wordpress.org
Tue Apr 4 18:13:54 UTC 2023


#58087: Refactor WP_Term to ensure better compatibility with PHP 8.2
------------------------------+-----------------------------
 Reporter:  antonvlasenko     |      Owner:  (none)
     Type:  enhancement       |     Status:  new
 Priority:  normal            |  Milestone:  Awaiting Review
Component:  Taxonomy          |    Version:  trunk
 Severity:  minor             |   Keywords:  dev-feedback
  Focuses:  coding-standards  |
------------------------------+-----------------------------
 The `WP_Term` class employs the `__get` magic method to compute the object
 data.
 However, since PHP 8.2 does not support dynamic properties, it is better
 to eliminate this approach and explicitly declare the `WP_Term::data`
 class property to store the object's data instead.

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


More information about the wp-trac mailing list