Docs: Add missing @global annotations in abstract-testcase.php#10841
Docs: Add missing @global annotations in abstract-testcase.php#10841noruzzamans wants to merge 11 commits intoWordPress:trunkfrom
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
src/wp-includes/deprecated.php
Outdated
| * @deprecated 0.71 Use get_the_category_by_ID() | ||
| * @see get_the_category_by_ID() | ||
| * | ||
| * @global int $currentcat |
There was a problem hiding this comment.
No needs to edit/update deprecated functions as it was not used
| * @since 6.4.0 The `$revisions_enabled` argument was added to the arguments array. | ||
| * @since 6.7.0 The `label` argument was added to the arguments array. | ||
| * | ||
| * @global array $wp_meta_keys Global registry for meta keys. |
There was a problem hiding this comment.
Let's add similar description here https://github.com/WordPress/wordpress-develop/blob/trunk/tests/phpunit/includes/abstract-testcase.php#L455 and other places for code files.
There was a problem hiding this comment.
@mukeshpanchal27 I have updated the @global documentation in abstract-testcase.php and reverted the changes in deprecated.php as suggested.
| * @global array $wp_filter Stores all of the filters and actions. | ||
| * @global array $wp_actions Stores the number of times each action was triggered. | ||
| * @global array $wp_filters Stores the number of times each filter was triggered. | ||
| * @global array $wp_current_filter Stores the list of current filters with the current one last. |
There was a problem hiding this comment.
I don't think a these descriptions should start with a verb ("Stores"). They should be nouns. So strip the "Stores" off.
| * @global array $wp_filter Stores all of the filters and actions. | ||
| * @global array $wp_actions Stores the number of times each action was triggered. | ||
| * @global array $wp_filters Stores the number of times each filter was triggered. | ||
| * @global array $wp_current_filter Stores the list of current filters with the current one last. |
Co-authored-by: Weston Ruter <westonruter@gmail.com>
Co-authored-by: Weston Ruter <westonruter@gmail.com>
|
@noruzzamans Could you please resolve conflicts? |
| * @global wpdb $wpdb WordPress database abstraction object. | ||
| * @global WP_Query $wp_the_query Main WordPress query object. | ||
| * @global WP_Query $wp_query WordPress query object. | ||
| * @global WP $wp WordPress environment object. |
There was a problem hiding this comment.
| * @global wpdb $wpdb WordPress database abstraction object. | |
| * @global WP_Query $wp_the_query Main WordPress query object. | |
| * @global WP_Query $wp_query WordPress query object. | |
| * @global WP $wp WordPress environment object. | |
| * @global wpdb $wpdb WordPress database abstraction object. | |
| * @global WP_Query $wp_the_query Main WordPress query object. | |
| * @global WP_Query $wp_query WordPress query object. | |
| * @global WP $wp WordPress environment object. |
|
It looks like this PR may already have been committed: |
…ans/wordpress-develop into fix/missing-global-tags
|
@shail-mehta @westonruter @mukeshpanchal27 @huzaifaalmesbah Thanks for review. I have updated all changes. if need any changes please let me know. Thanks |
mukeshpanchal27
left a comment
There was a problem hiding this comment.
Let’s update the PR title and description, as they’re outdated now.
Co-authored-by: Mukesh Panchal <mukeshpanchal27@users.noreply.github.com>
@mukeshpanchal27 Thanks. I have updated the title and description based on your suggestion. |
Trac Ticket: https://core.trac.wordpress.org/ticket/64224
Why this change?
This change adds missing @global documentation tags to functions in
tests/phpunit/includes/abstract-testcase.php
By documenting the global variables used within these functions (such as $wpdb, $wp_rewrite, $wp_the_query, etc.), we align the test suite's codebase with the WordPress PHP Documentation Standards. This improves code clarity and enables better static analysis for the unit testing framework.
Files Changed:
tests/phpunit/includes/abstract-testcase.php