Make WordPress Core

Changes between Initial Version and Version 21 of Ticket #56876


Ignore:
Timestamp:
02/21/2023 02:28:14 AM (2 years ago)
Author:
ironprogrammer
Comment:

Updated description per comment:20.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #56876

    • Property Component changed from General to Administration
    • Property Summary changed from WP_List_Table should prevent using dynamic properties as they are not allowed in PHP 8.2 to Refactor 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 to 6.2
    • Property Keywords has-patch has-unit-tests php82 added; needs-patch needs-unit-tests removed
  • 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
     3But 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
     5Also, developers should get a warning when they try to set (get) dynamic properties on objects of these classes.
     6
     7As for the `WP_Admin_Bar` class: an investigation is needed to decide whether `WP_Admin_Bar::__get()` can be removed.
    58
    69Props to @jrf for identifying the issue 👏.