Make WordPress Core

Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#49373 closed enhancement (fixed)

Move WP_Object_Cache into its own file

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


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 years ago.

Download all attachments as: .zip

Change History (4)

#1 @SergeyBiryukov
4 years 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.

4 years ago

#2 @SergeyBiryukov
4 years 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 years 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.