[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:02 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 |
-------------------------------------------------+-------------------------
Old description:
> `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.
>
> Props to @jrf for identifying the issue 👏.
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.
--
Comment (by hellofromTonya):
Updated the ticket's description to include the references to:
* [https://www.youtube.com/watch?v=vDZWepDQQVE&t=9362s the livestream],
where these changes were discussed and agreed to by @markjaquith, @jrf,
and me.
* #56034 - as this change is part of that work.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56876#comment:30>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list