[wp-trac] [WordPress Trac] #56876: Refactor magic methods in WP_List_Table, WP_User_Query, WP_Text_Diff_Renderer_Table and WP_Admin_Bar classes (was: WP_List_Table, WP_User_Query, WP_Text_Diff_Renderer_Table classes should prevent using dynamic properties as they are not allowed in PHP 8.2)

WordPress Trac noreply at wordpress.org
Fri Feb 17 22:48:30 UTC 2023


#56876: Refactor magic methods in WP_List_Table, WP_User_Query,
WP_Text_Diff_Renderer_Table and WP_Admin_Bar classes
--------------------------------------------+---------------------
 Reporter:  antonvlasenko                   |       Owner:  (none)
     Type:  defect (bug)                    |      Status:  new
 Priority:  normal                          |   Milestone:  6.2
Component:  Administration                  |     Version:
 Severity:  normal                          |  Resolution:
 Keywords:  has-patch has-unit-tests php82  |     Focuses:
--------------------------------------------+---------------------

Comment (by antonvlasenko):

 **Updated description** for this ticket (I'm unable to change it with my
 .org account):
 `WP_List_Table`, `WP_User_Query`, and `WP_Text_Diff_Renderer_Table`
 classes implement some magic methods.
 But these magic methods need to be refactored to ensure that these classes
 are compatible with PHP 8.2 (the magic methods in these classes are only
 partially implemented, the missing/incomplete magic methods should be
 added/refactored).
 Also, developers should get a warning when they try to set (get) dynamic
 properties on objects of these classes.
 As for the `WP_Admin_Bar` class: an investigation is needed to decide
 whether `WP_Admin_Bar::__get()` can be removed.

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


More information about the wp-trac mailing list