-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Docs: Add missing @global annotations in abstract-testcase.php #10841
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think a these descriptions should start with a verb ("Stores"). They should be nouns. So strip the "Stores" off.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
| * @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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| * @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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
Developed in #10841 Follow-up to [61589], [61584]. Props noruzzaman, mukesh27, westonruter, shailu25, huzaifaalmesbah. See #64224. git-svn-id: https://develop.svn.wordpress.org/trunk@61604 602fd350-edb4-49c9-b593-d223f7449a82
Developed in WordPress/wordpress-develop#10841 Follow-up to [61589], [61584]. Props noruzzaman, mukesh27, westonruter, shailu25, huzaifaalmesbah. See #64224. Built from https://develop.svn.wordpress.org/trunk@61604 git-svn-id: http://core.svn.wordpress.org/trunk@60915 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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