#56535 closed enhancement (duplicate)
Improve the compatibility of WP_Admin_Bar with PHP 8.2
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Toolbar | Keywords: | has-patch has-unit-tests php82 |
Focuses: | Cc: |
Description
The WP_Admin_Bar
class currently uses the __get
magic method to return values for some of its properties.
These dynamic properties are not supported in PHP 8.2 and above.
Therefore, WP_Admin_Bar
should be refactored to remove the dynamic properties while ensuring that backward compatibility is preserved.
Change History (7)
This ticket was mentioned in PR #3216 on WordPress/wordpress-develop by anton-vlasenko.
3 years ago
#2
- Keywords has-patch has-unit-tests added
This PR aims to improve compatibility of the WP_Admin_Bar class with PHP 8.2 and above by removing dynamic properties while making sure that this won't break backward compatibility.
Trac ticket: https://core.trac.wordpress.org/ticket/56535
#5
@
2 years ago
- Resolution set to duplicate
- Status changed from new to closed
Duplicate of #56876.
This issue is closed in favor of https://core.trac.wordpress.org/ticket/56876, and the related changes have been moved from https://github.com/WordPress/wordpress-develop/pull/3216 to https://github.com/WordPress/wordpress-develop/pull/3535.
Why?
This ensures that all the classes with the self::$compat_fields
property get fixed in the scope of a single PR.
I'm working on a patch for this issue.