WordPress.org

Make WordPress Core

Opened 4 months ago

Closed 4 months ago

Last modified 4 months ago

#49373 closed enhancement (fixed)

Move WP_Object_Cache into its own file

Reported by: SergeyBiryukov Owned by: SergeyBiryukov
Milestone: 5.4 Priority: normal
Severity: normal Version:
Component: Cache API Keywords:
Focuses: coding-standards Cc:

Description

Background: #33413, #37035, #37209, #37827, #47775.

In the tickets linked above, most of WP core classes were moved to their own files to conform to ​naming conventions in WordPress coding standards.

The same should be done for the WP_Object_Cache class, which currently resides in wp-includes/cache.php and should be moved to wp-includes/class-wp-object-cache.php.

For backward compatibility, the new file should be included from wp-includes/cache.php.

Attachments (1)

49373.diff​ (26.5 KB) - added by xkon 4 months ago.

Download all attachments as: .zip

Change History (4)

#1 @SergeyBiryukov
4 months ago

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

In 47197:

Coding Standards: Move WP_Object_Cache to wp-includes/class-wp-object-cache.php.

This ensures the file containing the WP_Object_Cache class conforms to the coding standards.

For backward compatibility, the new file is included from wp-includes/cache.php.

Fixes #49373. See #49222.

@xkon
4 months ago

#2 @SergeyBiryukov
4 months ago

@xkon Sorry, should have commented that I already had the changes locally and was just waiting for the tests to pass :)

#3 @xkon
4 months ago

Haha no problem at all @SergeyBiryukov ! I was pretty sure that you might've been cooking a patch as well. I didn't refresh the page here either before uploading it so I missed the commit comment 😂 .

All good!

Note: See TracTickets for help on using tickets.