Make WordPress Core

Opened 11 months ago

Closed 11 months ago

Last modified 11 months ago

#58736 closed defect (bug) (fixed)

Dynamic property warning WP_Object_Cache

Reported by: spacedmonkey's profile spacedmonkey Owned by: spacedmonkey's profile spacedmonkey
Milestone: 6.3 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: php82 has-patch has-unit-tests
Focuses: Cc:

Description

While testing with memcache enabled on local dev environment in PHP 8.2, I noticed a copy of places where I was getting dynamic property warning.

Deprecated: Creation of dynamic property WP_Object_Cache::$thirty_days is deprecated in /var/www/src/wp-content/object-cache.php on line 959

Deprecated: Creation of dynamic property WP_Object_Cache::$now is deprecated in /var/www/src/wp-content/object-cache.php on line 960

Change History (5)

#1 @spacedmonkey
11 months ago

  • Keywords php82 added

This ticket was mentioned in PR #4806 on WordPress/wordpress-develop by @spacedmonkey.


11 months ago
#2

  • Keywords has-patch has-unit-tests added

#3 @mukesh27
11 months ago

#58735 was marked as a duplicate.

#4 @spacedmonkey
11 months ago

  • Owner set to spacedmonkey
  • Resolution set to fixed
  • Status changed from new to closed

In 56161:

Build/Test: Fix dynamic property deprecation warning in object cache drop-in.

Fix deprecation warning for dynamic property in object cache drop-in used in core unit tests.

Dynamic (non-explicitly declared) properties are deprecated as of PHP 8.2 and are expected to become a fatal error in PHP 9.0.

Props spacedmonkey, johnbillion.
Fixes #58736.
See #56034.

Note: See TracTickets for help on using tickets.