#53399 closed task (blessed) (fixed)
Docblock improvements for WP 5.9
Reported by: | desrosj | Owned by: | |
---|---|---|---|
Milestone: | 5.9 | Priority: | normal |
Severity: | normal | Version: | |
Component: | General | Keywords: | has-patch has-unit-tests |
Focuses: | docs | Cc: |
Attachments (2)
Change History (136)
#15
follow-up:
↓ 16
@
3 years ago
@johnbillion Removing @global
tags for $wp_local_package
and $wp_locale
in setup_config_display_header()
doesn't seem correct, they are both used further in the function.
Should we perhaps declare them explicitly instead of accessing via the $GLOBALS
array?
#16
in reply to:
↑ 15
;
follow-up:
↓ 17
@
3 years ago
Replying to SergeyBiryukov:
they are both used further in the function
They actually fall outside of the function, which ends a few lines above. I didn't check but I suspect that's the original intention of those docs.
#17
in reply to:
↑ 16
@
3 years ago
Replying to johnbillion:
They actually fall outside of the function, which ends a few lines above.
Ah, yes, you're right. The docs were added in [32642], apparently due to a similar mistake that I made.
#27
follow-up:
↓ 31
@
3 years ago
53399.internal.diff converts two @internal
notes in wp-includes/ms-load.php
to @since
tags.
This would be more consistent with other similar @since
notes in core:
the_author_posts_link()
:@since 4.4.0 Converted into a wrapper for get_the_author_posts_link()
date_i18n()
:@since 5.3.0 Converted into a wrapper for wp_date().
language_attributes()
:@since 4.3.0 Converted into a wrapper for get_language_attributes().
WP_REST_Server::error_to_response()
@since 5.7.0 Converted to a wrapper of {@see rest_convert_error_to_response()}.
This would be a follow-up to [34099] and [38515]. However, I noticed that it reverts a part of [38201].
@johnbillion Do you have a preference here? Perhaps the notes above should be converted to @internal
instead?
#31
in reply to:
↑ 27
;
follow-up:
↓ 32
@
3 years ago
Replying to SergeyBiryukov:
Do you have a preference here? Perhaps the notes above should be converted to
@internal
instead?
@SergeyBiryukov To be honest I don't think these comments provide value to a developer. Whether or not a function internally wraps another one is of no consequence if it doesn't affect its external API. I'd be in favour of removing them.
#32
in reply to:
↑ 31
@
3 years ago
Replying to johnbillion:
To be honest I don't think these comments provide value to a developer. Whether or not a function internally wraps another one is of no consequence if it doesn't affect its external API. I'd be in favour of removing them.
I think this falls under the last point in @since Section (Changelogs):
If significant changes have been made to a function, hook, class, or method, additional
@since
tags, versions, and descriptions should be added to provide a changelog for that function.
“Significant changes” include but are not limited to:
- Adding new arguments or parameters
- Required arguments becoming optional
- Changing default/expected behaviors
- Functions or methods becoming wrappers for new APIs
Personally, I see some value in being able to tell if there is another function that can be used as a suitable replacement, and in which version the change was made.
#37
@
3 years ago
While I was working on a ticket related to the Admin Toolbar, I spotted a bunch of inconsistencies. I added a small patch to fix them, feel free to use it if needed :)
This ticket was mentioned in Slack in #core by sergey. View the logs.
3 years ago
This ticket was mentioned in PR #1886 on WordPress/wordpress-develop by audrasjb.
3 years ago
#58
- Keywords has-patch added
Trac ticket: https://core.trac.wordpress.org/ticket/53399
#59
@
3 years ago
Hi,
I added a PR for a small DocBlock change.
We have to props @andy-schmidt who suggested this change on DevHub User Notes :)
This ticket was mentioned in PR #1910 on WordPress/wordpress-develop by johnbillion.
3 years ago
#60
- Keywords has-unit-tests added
Trac ticket: https://core.trac.wordpress.org/ticket/53399
If you're interested, these were all detected by the ongoing work on the phpstan-wordpress
library in https://github.com/szepeviktor/phpstan-wordpress/pull/78 .
This ticket was mentioned in PR #1911 on WordPress/wordpress-develop by johnbillion.
3 years ago
#61
Trac ticket: https://core.trac.wordpress.org/ticket/53399
Corrections to the documented type for comment ID and site ID properties.
johnbillion commented on PR #1911:
3 years ago
#64
johnbillion commented on PR #1911:
3 years ago
#65
johnbillion commented on PR #1910:
3 years ago
#66
3 years ago
#68
Committed in https://core.trac.wordpress.org/changeset/52208
This ticket was mentioned in PR #1938 on WordPress/wordpress-develop by audrasjb.
3 years ago
#72
Trac ticket: https://core.trac.wordpress.org/ticket/53399
3 years ago
#74
Committed in https://core.trac.wordpress.org/changeset/52239
This ticket was mentioned in PR #1946 on WordPress/wordpress-develop by audrasjb.
3 years ago
#76
Trac ticket: https://core.trac.wordpress.org/ticket/53399
This ticket was mentioned in PR #1987 on WordPress/wordpress-develop by audrasjb.
3 years ago
#80
Trac ticket: https://core.trac.wordpress.org/ticket/53399
3 years ago
#82
Committed in https://core.trac.wordpress.org/changeset/52298
This ticket was mentioned in PR #1988 on WordPress/wordpress-develop by audrasjb.
3 years ago
#84
Trac ticket: https://core.trac.wordpress.org/ticket/53399
3 years ago
#86
Committed in https://core.trac.wordpress.org/changeset/52301
This ticket was mentioned in PR #1992 on WordPress/wordpress-develop by audrasjb.
3 years ago
#87
Trac ticket: https://core.trac.wordpress.org/ticket/53399
3 years ago
#89
Committed in https://core.trac.wordpress.org/changeset/52302
This ticket was mentioned in PR #1993 on WordPress/wordpress-develop by audrasjb.
3 years ago
#90
Trac ticket: https://core.trac.wordpress.org/ticket/53399
3 years ago
#92
Committed in https://core.trac.wordpress.org/changeset/52303
This ticket was mentioned in PR #1994 on WordPress/wordpress-develop by audrasjb.
3 years ago
#94
Trac ticket: https://core.trac.wordpress.org/ticket/53399
This ticket was mentioned in PR #1994 on WordPress/wordpress-develop by audrasjb.
3 years ago
#95
Trac ticket: https://core.trac.wordpress.org/ticket/53399
3 years ago
#98
Committed in https://core.trac.wordpress.org/changeset/52307
This ticket was mentioned in PR #2004 on WordPress/wordpress-develop by audrasjb.
3 years ago
#99
Trac ticket: https://core.trac.wordpress.org/ticket/53399
This ticket was mentioned in PR #2005 on WordPress/wordpress-develop by audrasjb.
3 years ago
#101
Trac ticket: https://core.trac.wordpress.org/ticket/53399
3 years ago
#103
Committed in https://core.trac.wordpress.org/changeset/52318
3 years ago
#104
Committed in https://core.trac.wordpress.org/changeset/52317
This ticket was mentioned in PR #2046 on WordPress/wordpress-develop by audrasjb.
3 years ago
#114
Trac ticket: https://core.trac.wordpress.org/ticket/53399
This ticket was mentioned in PR #2047 on WordPress/wordpress-develop by audrasjb.
3 years ago
#116
Trac ticket: https://core.trac.wordpress.org/ticket/53399
3 years ago
#118
Committed in https://core.trac.wordpress.org/changeset/52360
3 years ago
#119
Committed in https://core.trac.wordpress.org/changeset/52361
This ticket was mentioned in PR #2050 on WordPress/wordpress-develop by audrasjb.
3 years ago
#121
Trac ticket: https://core.trac.wordpress.org/ticket/53399
3 years ago
#123
Committed in https://core.trac.wordpress.org/changeset/52366
#131
@
3 years ago
- Resolution set to fixed
- Status changed from new to closed
With 5.9 RC1 tomorrow, closing this ticket.
If there are any more changes required between now and the final 5.9 release, this can be referenced and reopened if necessary with dev-reviewed
.
#54729 is open for continuation during the 6.0 cycle.
hellofromtonya commented on PR #1946:
3 years ago
#132
Committed via https://core.trac.wordpress.org/changeset/52249.
In 51278: