[wp-trac] [WordPress Trac] #56876: Dynamic Properties: Fix magic methods in WP_List_Table, WP_User_Query, WP_Text_Diff_Renderer_Table and WP_Admin_Bar classes

WordPress Trac noreply at wordpress.org
Thu Mar 16 12:34:28 UTC 2023


#56876: Dynamic Properties: Fix magic methods in WP_List_Table, WP_User_Query,
WP_Text_Diff_Renderer_Table and WP_Admin_Bar classes
-------------------------------------------------+-------------------------
 Reporter:  antonvlasenko                        |       Owner:
                                                 |  hellofromTonya
     Type:  defect (bug)                         |      Status:  reviewing
 Priority:  normal                               |   Milestone:  6.3
Component:  Administration                       |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests php82       |     Focuses:
  early commit                                   |
-------------------------------------------------+-------------------------
Description changed by hellofromTonya:

Old description:

> `WP_List_Table`, `WP_User_Query`, and `WP_Text_Diff_Renderer_Table`
> classes implement an incomplete set of 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.
>
> Props to @jrf for identifying the issue 👏.
>
> References:
> * These changes were [https://www.youtube.com/watch?v=vDZWepDQQVE&t=9362s
> discussed and agreed to in a livestream] by @jrf @ markjaquith and
> @hellofromTonya.
> * The changes are part of #56034, which is the larger Dynamic Properties
> proposal and initiative.

New description:

 `WP_List_Table`, `WP_User_Query`, and `WP_Text_Diff_Renderer_Table`
 classes implement an incomplete set of 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.

 Props to @jrf for identifying the issue 👏.

 References:
 * These changes were [https://www.youtube.com/watch?v=vDZWepDQQVE&t=9362s
 discussed and agreed to in a livestream] by @jrf @markjaquith and
 @hellofromTonya.
 * The changes are part of #56034, which is the larger Dynamic Properties
 proposal and initiative.

--

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


More information about the wp-trac mailing list