[wp-trac] [WordPress Trac] #58087: Fix the 'data' dynamic property in WP_Term

WordPress Trac noreply at wordpress.org
Thu Aug 15 19:39:17 UTC 2024


#58087: Fix the 'data' dynamic property in WP_Term
-------------------------------------+-------------------------------------
 Reporter:  antonvlasenko            |       Owner:  hellofromTonya
     Type:  defect (bug)             |      Status:  accepted
 Priority:  normal                   |   Milestone:  6.7
Component:  Taxonomy                 |     Version:  6.3
 Severity:  minor                    |  Resolution:
 Keywords:  php82 needs-testing      |     Focuses:  coding-standards, php-
  has-patch has-unit-tests early     |  compatibility
-------------------------------------+-------------------------------------

Comment (by hellofromTonya):

 After reviewing the challenges of the proposed #60875 and what is needed
 to implement it, I'm of the opinion it's too complicated in relationship
 to handling the `data` dynamic property.

 In the journey to figure out how to handle this particular dynamic
 property, we've explored various approaches and each came with a set of
 challenges.

 I'm now of the opinion that [https://github.com/WordPress/wordpress-
 develop/pull/4307 PR 4307] is the right approach.

 This approach:
 * Adds a new public method intended for usage outside of the object within
 Core and extenders implementations
 * Deprecates the usage of the `__get()` magic method to alert extenders to
 update their plugins and themes to use the new public method.

 It does not introduce a BC break. And there are no identified issues or
 side-effects. After this journey, I now see it as the most simplistic
 approach that achieves the goals for resolving not only the dynamic
 properties but also removing incomplete magic methods.

 I'm reopening that PR with the intent to move forward with commit during
 6.7 alpha phases. Committing it early enough will give a longer soak time
 for testing and feedback.

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


More information about the wp-trac mailing list