[wp-trac] [WordPress Trac] #61890: Handle WP_Term dynamic properties for PHP 8.2
WordPress Trac
noreply at wordpress.org
Fri Aug 30 16:01:37 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 adrianduffell):
Replying to [comment:26 hellofromTonya]:
> 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 [https://3v4l.org/IPLfu type casting
returned the same result], this method is there to be used as the
means/mechanism to convert the term object to an array.
Interesting, as an extender I don't find this intuitive. I would see that
all PHP language constructs such as `(array)` type casting would be
supported by WordPress, unless forbidden in the coding standards. Has
there been previous guidance about it not being supported?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61890#comment:27>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list