Make WordPress Core

Opened 3 years ago

Closed 2 years ago

Last modified 21 months ago

#56535 closed enhancement (duplicate)

Improve the compatibility of WP_Admin_Bar with PHP 8.2

Reported by: antonvlasenko's profile antonvlasenko 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)

#1 @antonvlasenko
3 years ago

I'm working on a patch for this issue.

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

#3 @SergeyBiryukov
3 years ago

  • Component changed from General to Toolbar
  • Keywords php82 added

#4 @desrosj
3 years ago

  • Milestone changed from Awaiting Review to Future Release
  • Version trunk deleted

#5 @antonvlasenko
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.

#7 @desrosj
21 months ago

  • Milestone Future Release deleted
Note: See TracTickets for help on using tickets.