Changes between Initial Version and Version 21 of Ticket #56876
- Timestamp:
- 02/21/2023 02:28:14 AM (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #56876
-
Property
Component
changed from
General
toAdministration
-
Property
Summary
changed from
WP_List_Table should prevent using dynamic properties as they are not allowed in PHP 8.2
toRefactor magic methods in WP_List_Table, WP_User_Query, WP_Text_Diff_Renderer_Table and WP_Admin_Bar classes
-
Property
Version
changed from
trunk
to -
Property
Milestone
changed from
Awaiting Review
to6.2
- Property Keywords has-patch has-unit-tests php82 added; needs-patch needs-unit-tests removed
-
Property
Component
changed from
-
Ticket #56876 – Description
initial v21 1 Developers should get a notice when trying to get or set a dynamic property on `WP_List_Table`. 2 The current implementation of the class correctly handles some dynamic properties. 3 But, in addition to the allowed dynamic properties, it enables the use of arbitrary properties. 4 This behavior is incompatible with PHP 8.2 and should be fixed. 1 `WP_List_Table`, `WP_User_Query`, and `WP_Text_Diff_Renderer_Table` classes implement some magic methods. 2 3 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). 4 5 Also, developers should get a warning when they try to set (get) dynamic properties on objects of these classes. 6 7 As for the `WP_Admin_Bar` class: an investigation is needed to decide whether `WP_Admin_Bar::__get()` can be removed. 5 8 6 9 Props to @jrf for identifying the issue 👏.