Make WordPress Core

Opened 8 months ago

Closed 7 months ago

Last modified 7 months ago

#63516 closed defect (bug) (fixed)

Explicitly deprecate WP_Debug_Data::get_sizes()

Reported by: sergeybiryukov's profile SergeyBiryukov Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.9 Priority: normal
Severity: minor Version: 5.6
Component: Site Health Keywords: good-first-bug has-patch
Focuses: Cc:

Description

WP_Debug_Data::get_sizes() is unused in core as of [49154] (WordPress 5.6) and was soft-deprecated in [60272].

I think we can explicitly deprecate it by adding a _deprecated_function() call at the top:

_deprecated_function( __METHOD__, '5.6.0', 'WP_REST_Site_Health_Controller::get_directory_sizes()' );

Change History (4)

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


8 months ago
#1

  • Keywords has-patch added; needs-patch removed

Trac ticket: 63516
---
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

This PR explicitly deprecates WP_Debug_Data::get_sizes() function according to suggestions in trac ticket (unused in core)

@yashjawale commented on PR #8883:


8 months ago
#2

I've tested that deprecation works as intended by calling WP_Debug_Data::get_sizes() in a test plugin

https://github.com/user-attachments/assets/346654ec-0a45-49ed-8b4c-d95f4db53023

Thanks!

@ankitkumarshah commented on PR #8883:


7 months ago
#3

Thanks for your first contribution 🎉
It works well, and the Depreciation info is shown as expected:
#### Screenshot:
https://github.com/user-attachments/assets/c0a5a2a0-e231-4d2e-bf0e-3ab6bf8e3a6d

#4 @SergeyBiryukov
7 months ago

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

In 60274:

Site Health: Explicitly deprecate WP_Debug_Data::get_sizes(), unused since WP 5.6.

Follow-up to [49154], [60272].

Props yashjawale, dhruvang21, ankitkumarshah, SergeyBiryukov.
Fixes #63516.

Note: See TracTickets for help on using tickets.