[wp-trac] [WordPress Trac] #61890: Handle WP_Term dynamic properties for PHP 8.2
WordPress Trac
noreply at wordpress.org
Thu Aug 29 18:02:56 UTC 2024
#61890: Handle WP_Term dynamic properties for PHP 8.2
-------------------------------------+-------------------------------------
Reporter: hellofromTonya | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.7
Component: Taxonomy | Version: 4.4
Severity: minor | Resolution:
Keywords: php82 has-patch has- | Focuses: coding-standards, php-
unit-tests needs-testing needs- | compatibility
dev-note has-testing-info |
-------------------------------------+-------------------------------------
Comment (by hellofromTonya):
Replying to @adrianduffell comment:25
>It looks like there is a backwards compatibility break in a scenario
where dynamic properties are added to WP_Term objects and those are being
cast with (array)
IMO Approach 2 is not a backward compatibility (BC) break.
Why? The `WP_Term::to_array()` method has been available since `WP_Term`
introduction back in WP 4.4.0. While type casting returned the same
result, this method is there to be used as the means to convert the term
object to an array.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61890#comment:26>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list