WordPress.org

Make WordPress Core

Opened 5 months ago

Closed 5 months ago

Last modified 4 months ago

#50426 closed defect (bug) (fixed)

Remove @staticvar tags from core

Reported by: SergeyBiryukov Owned by: SergeyBiryukov
Milestone: 5.5 Priority: normal
Severity: normal Version:
Component: General Keywords: good-first-bug has-patch has-dev-note
Focuses: docs Cc:

Description

In comment:7:ticket:49446, the usage of @staticvar documentation tag came up.

It's currently used in core, but was not documented in the PHP Documentation Standards. It is now mentioned with a note that it has been used in the past, but should no longer be used.

Per discussion with @jrf, the tag was supported in phpDocumentor 1.x, but is no longer supported in 2.x and 3.x.

Usage of static variables is considered an internal implementation detail and has no information value for someone reading the docs. The tag is also not listed in WordPress Code Reference, so removing it would not remove anything from the user-facing documentation.

Attachments (2)

50426.diff (26.4 KB) - added by alishanvr 5 months ago.
Removed the @staticvar from wp-admin and all subfolders of wp-admin
50426.1.diff (5.5 KB) - added by alishanvr 5 months ago.
Removed the @staticvar from wp-content, wp-includes and all of their subfolders.

Download all attachments as: .zip

Change History (6)

@alishanvr
5 months ago

Removed the @staticvar from wp-admin and all subfolders of wp-admin

@alishanvr
5 months ago

Removed the @staticvar from wp-content, wp-includes and all of their subfolders.

#1 @alishanvr
5 months ago

Hi,

I have a little mistake that the description is replaced by each other patches. And I didn't find to delete and re-upload the patch with the correct description.

Thank You,

#2 @SergeyBiryukov
5 months ago

  • Keywords has-patch added; needs-patch removed

The patches looks great, thank you!

#3 @SergeyBiryukov
5 months ago

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

In 48109:

Docs: Remove @staticvar tags from core.

The tag was supported in phpDocumentor 1.x, but is no longer supported in 2.x and 3.x.

Usage of static variables is considered an internal implementation detail and has no information value for someone reading the docs.

Props alishanvr, jrf.
Fixes #50426.

#4 @desrosj
4 months ago

  • Keywords has-dev-note added

This received a call out in the Miscellaneous Developer Changes in 5.5 dev note: https://make.wordpress.org/core/2020/07/29/miscellaneous-developer-focused-changes-in-wordpress-5-5/.

Note: See TracTickets for help on using tickets.