[wp-trac] [WordPress Trac] #61890: Handle WP_Term dynamic properties for PHP 8.2
WordPress Trac
noreply at wordpress.org
Wed Sep 25 20:35:16 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 [comment:27 adrianduffell]:
>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?
Sorry for my late response. You raised a valid and good point.
In order to continue supporting `(array)` type casting while also ensuring
it matches the same results with `to_array()`, this means
[https://github.com/WordPress/wordpress-develop/pull/7231 Approach 2] is
not a viable solution.
In reconsidering, I think @adrianduffell is right (thank you for raising
it). [https://github.com/WordPress/wordpress-
develop/pull/7231#issuecomment-2375191427 I closed Approach 2's PR].
Doing so then means `WP_Term` will not support dynamic properties.
I'll update this ticket's description for clarity with what is known
today.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61890#comment:30>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list