From b80d3cb080d1678cd2cd34b17b3206c64ee1eeaf Mon Sep 17 00:00:00 2001
From: jrfnl <jrfnl@users.noreply.github.com>
Date: Wed, 9 Oct 2019 01:48:53 +0200
Subject: [PATCH] Documentation: add @since changelog entries about the
 function signature changes

---
 src/wp-admin/includes/class-wp-ajax-upgrader-skin.php |  4 ++++
 src/wp-admin/includes/dashboard.php                   |  2 ++
 src/wp-admin/includes/media.php                       |  2 ++
 src/wp-includes/capabilities.php                      | 10 ++++++++++
 src/wp-includes/category-template.php                 | 10 ++++++++--
 src/wp-includes/class-wp-dependency.php               |  2 ++
 src/wp-includes/class-wp-user.php                     |  2 ++
 src/wp-includes/class-wp-walker.php                   |  4 ++++
 src/wp-includes/formatting.php                        |  3 +++
 src/wp-includes/functions.php                         |  2 ++
 src/wp-includes/plugin.php                            |  2 ++
 src/wp-includes/post-template.php                     |  5 ++++-
 src/wp-includes/post.php                              |  2 ++
 src/wp-includes/theme.php                             |  6 ++++++
 src/wp-includes/widgets.php                           |  8 ++++++++
 src/wp-includes/wp-db.php                             |  3 +++
 tests/phpunit/includes/abstract-testcase.php          |  2 ++
 17 files changed, 66 insertions(+), 3 deletions(-)

diff --git a/src/wp-admin/includes/class-wp-ajax-upgrader-skin.php b/src/wp-admin/includes/class-wp-ajax-upgrader-skin.php
index b19e573fb8..75ba62fafc 100644
--- a/src/wp-admin/includes/class-wp-ajax-upgrader-skin.php
+++ b/src/wp-admin/includes/class-wp-ajax-upgrader-skin.php
@@ -77,6 +77,8 @@ class WP_Ajax_Upgrader_Skin extends Automatic_Upgrader_Skin {
 	 * Stores a log entry for an error.
 	 *
 	 * @since 4.6.0
+	 * @since 5.3.0 Formalized the existing ...$args parameter by adding it
+	 *              to the function signature.
 	 *
 	 * @param string|WP_Error $errors  Errors.
 	 * @param mixed           ...$args Optional text replacements.
@@ -110,6 +112,8 @@ class WP_Ajax_Upgrader_Skin extends Automatic_Upgrader_Skin {
 	 * Stores a log entry.
 	 *
 	 * @since 4.6.0
+	 * @since 5.3.0 Formalized the existing ...$args parameter by adding it
+	 *              to the function signature.
 	 *
 	 * @param string|array|WP_Error $data    Log entry data.
 	 * @param mixed                 ...$args Optional text replacements.
diff --git a/src/wp-admin/includes/dashboard.php b/src/wp-admin/includes/dashboard.php
index eb9b86d468..b1090fdc21 100644
--- a/src/wp-admin/includes/dashboard.php
+++ b/src/wp-admin/includes/dashboard.php
@@ -1055,6 +1055,8 @@ function wp_dashboard_rss_output( $widget_id ) {
  * which is later replaced by Ajax call (see top of /wp-admin/index.php)
  *
  * @since 2.5.0
+ * @since 5.3.0 Formalized the existing and already documented ...$args parameter
+ *              by adding it to the function signature.
  *
  * @param string   $widget_id  The widget ID.
  * @param callable $callback   The callback funtion used to display each feed.
diff --git a/src/wp-admin/includes/media.php b/src/wp-admin/includes/media.php
index b9e9acc99d..f67cc83725 100644
--- a/src/wp-admin/includes/media.php
+++ b/src/wp-admin/includes/media.php
@@ -504,6 +504,8 @@ function media_handle_sideload( $file_array, $post_id = 0, $desc = null, $post_d
  * Outputs the iframe to display the media upload page.
  *
  * @since 2.5.0
+ * @since 5.3.0 Formalized the existing and already documented ...$args parameter
+ *              by adding it to the function signature.
  *
  * @global int $body_id
  *
diff --git a/src/wp-includes/capabilities.php b/src/wp-includes/capabilities.php
index e3a18f6b28..53da5c8085 100644
--- a/src/wp-includes/capabilities.php
+++ b/src/wp-includes/capabilities.php
@@ -25,6 +25,8 @@
  * 'delete_page', 'edit_post', 'edit_page', 'read_post', or 'read_page'.
  *
  * @since 2.0.0
+ * @since 5.3.0 Formalized the existing and already documented ...$args parameter
+ *              by adding it to the function signature.
  *
  * @global array $post_type_meta_caps Used to get post type meta capabilities.
  *
@@ -635,6 +637,8 @@ function map_meta_cap( $cap, $user_id, ...$args ) {
  * Note: Will always return true if the current user is a super admin, unless specifically denied.
  *
  * @since 2.0.0
+ * @since 5.3.0 Formalized the existing and already documented ...$args parameter
+ *              by adding it to the function signature.
  *
  * @see WP_User::has_cap()
  * @see map_meta_cap()
@@ -668,6 +672,8 @@ function current_user_can( $capability, ...$args ) {
  *     current_user_can_for_blog( $blog_id, 'edit_post_meta', $post->ID, $meta_key );
  *
  * @since 3.0.0
+ * @since 5.3.0 Formalized the existing and already documented ...$args parameter
+ *              by adding it to the function signature.
  *
  * @param int    $blog_id    Site ID.
  * @param string $capability Capability name.
@@ -709,6 +715,8 @@ function current_user_can_for_blog( $blog_id, $capability, ...$args ) {
  *     author_can( $post, 'edit_post_meta', $post->ID, $meta_key );
  *
  * @since 2.9.0
+ * @since 5.3.0 Formalized the existing and already documented ...$args parameter
+ *              by adding it to the function signature.
  *
  * @param int|WP_Post $post       Post ID or post object.
  * @param string      $capability Capability name.
@@ -744,6 +752,8 @@ function author_can( $post, $capability, ...$args ) {
  *     user_can( $user->ID, 'edit_post_meta', $post->ID, $meta_key );
  *
  * @since 3.1.0
+ * @since 5.3.0 Formalized the existing and already documented ...$args parameter
+ *              by adding it to the function signature.
  *
  * @param int|WP_User $user       User ID or object.
  * @param string      $capability Capability name.
diff --git a/src/wp-includes/category-template.php b/src/wp-includes/category-template.php
index 56cbdf7b7f..e345169672 100644
--- a/src/wp-includes/category-template.php
+++ b/src/wp-includes/category-template.php
@@ -1054,8 +1054,11 @@ function _wp_object_count_sort_cb( $a, $b ) {
 /**
  * Retrieve HTML list content for category list.
  *
- * @uses Walker_Category to create HTML list content.
  * @since 2.1.0
+ * @since 5.3.0 Formalized the existing ...$args parameter by adding it
+ *              to the function signature.
+ *
+ * @uses Walker_Category to create HTML list content.
  * @see Walker::walk() for parameters and return description.
  *
  * @param mixed ...$args Elements array, maximum hierarchical depth and optional additional arguments.
@@ -1074,8 +1077,11 @@ function walk_category_tree( ...$args ) {
 /**
  * Retrieve HTML dropdown (select) content for category list.
  *
- * @uses Walker_CategoryDropdown to create HTML dropdown content.
  * @since 2.1.0
+ * @since 5.3.0 Formalized the existing ...$args parameter by adding it
+ *              to the function signature.
+ *
+ * @uses Walker_CategoryDropdown to create HTML dropdown content.
  * @see Walker::walk() for parameters and return description.
  *
  * @param mixed ...$args Elements array, maximum hierarchical depth and optional additional arguments.
diff --git a/src/wp-includes/class-wp-dependency.php b/src/wp-includes/class-wp-dependency.php
index 12a3b94634..a4ea92d41d 100644
--- a/src/wp-includes/class-wp-dependency.php
+++ b/src/wp-includes/class-wp-dependency.php
@@ -87,6 +87,8 @@ class _WP_Dependency {
 	 * Setup dependencies.
 	 *
 	 * @since 2.6.0
+	 * @since 5.3.0 Formalized the existing ...$args parameter by adding it
+	 *              to the function signature.
 	 *
 	 * @param ...$args Dependency information.
 	 */
diff --git a/src/wp-includes/class-wp-user.php b/src/wp-includes/class-wp-user.php
index a1c2b6e2c4..0631bafa42 100644
--- a/src/wp-includes/class-wp-user.php
+++ b/src/wp-includes/class-wp-user.php
@@ -730,6 +730,8 @@ class WP_User {
 	 * may produce unreliable results.
 	 *
 	 * @since 2.0.0
+	 * @since 5.3.0 Formalized the existing and already documented ...$args parameter
+	 *              by adding it to the function signature.
 	 *
 	 * @see map_meta_cap()
 	 *
diff --git a/src/wp-includes/class-wp-walker.php b/src/wp-includes/class-wp-walker.php
index 0a764b9fc8..49e896f23f 100644
--- a/src/wp-includes/class-wp-walker.php
+++ b/src/wp-includes/class-wp-walker.php
@@ -177,6 +177,8 @@ class Walker {
 	 * $max_depth > 0 specifies the number of display levels.
 	 *
 	 * @since 2.1.0
+	 * @since 5.3.0 Formalized the existing ...$args parameter by adding
+	 *              it to the function signature.
 	 *
 	 * @param array $elements  An array of elements.
 	 * @param int   $max_depth The maximum hierarchical depth.
@@ -269,6 +271,8 @@ class Walker {
 	 * $max_depth > 0 specifies the number of display levels.
 	 *
 	 * @since 2.7.0
+	 * @since 5.3.0 Formalized the existing ...$args parameter by adding
+	 *              it to the function signature.
 	 *
 	 * @param array $elements
 	 * @param int   $max_depth The maximum hierarchical depth.
diff --git a/src/wp-includes/formatting.php b/src/wp-includes/formatting.php
index acc8de9188..9ea3adbfa4 100644
--- a/src/wp-includes/formatting.php
+++ b/src/wp-includes/formatting.php
@@ -4868,6 +4868,9 @@ function wp_pre_kses_less_than_callback( $matches ) {
  * WordPress implementation of PHP sprintf() with filters.
  *
  * @since 2.5.0
+ * @since 5.3.0 Formalized the existing and already documented ...$args parameter
+ *              by adding it to the function signature.
+ *
  * @link https://secure.php.net/sprintf
  *
  * @param string $pattern The string which formatted args are inserted.
diff --git a/src/wp-includes/functions.php b/src/wp-includes/functions.php
index 717da22699..14a322a928 100644
--- a/src/wp-includes/functions.php
+++ b/src/wp-includes/functions.php
@@ -1048,6 +1048,8 @@ function _http_build_query( $data, $prefix = null, $sep = null, $key = '', $urle
  * (XSS) attacks.
  *
  * @since 1.5.0
+ * @since 5.3.0 Formalized the existing and already documented parameters
+ *              by adding ...$args to the function signature.
  *
  * @param string|array $key   Either a query variable key, or an associative array of query variables.
  * @param string       $value Optional. Either a query variable value, or a URL to act upon.
diff --git a/src/wp-includes/plugin.php b/src/wp-includes/plugin.php
index 4dbab7412a..0e063eea1d 100644
--- a/src/wp-includes/plugin.php
+++ b/src/wp-includes/plugin.php
@@ -430,6 +430,8 @@ function add_action( $tag, $function_to_add, $priority = 10, $accepted_args = 1
  *     $value = do_action( 'example_action', $arg1, $arg2 );
  *
  * @since 1.2.0
+ * @since 5.3.0 Formalized the existing and already documented ...$arg parameter
+ *              by adding it to the function signature.
  *
  * @global array $wp_filter         Stores all of the filters
  * @global array $wp_actions        Increments the amount of times action was triggered.
diff --git a/src/wp-includes/post-template.php b/src/wp-includes/post-template.php
index 939c8f617e..4e86063d20 100644
--- a/src/wp-includes/post-template.php
+++ b/src/wp-includes/post-template.php
@@ -1530,8 +1530,11 @@ function walk_page_tree( $pages, $depth, $current_page, $r ) {
 /**
  * Retrieve HTML dropdown (select) content for page list.
  *
- * @uses Walker_PageDropdown to create HTML dropdown content.
  * @since 2.1.0
+ * @since 5.3.0 Formalized the existing ...$args parameter by adding it
+ *              to the function signature.
+ *
+ * @uses Walker_PageDropdown to create HTML dropdown content.
  * @see Walker_PageDropdown::walk() for parameters and return description.
  *
  * @return string
diff --git a/src/wp-includes/post.php b/src/wp-includes/post.php
index eea6a22b1a..45a0ae8396 100644
--- a/src/wp-includes/post.php
+++ b/src/wp-includes/post.php
@@ -1829,6 +1829,8 @@ function _add_post_type_submenus() {
  *     ) );
  *
  * @since 3.0.0
+ * @since 5.3.0 Formalized the existing and already documented ...$args parameter
+ *              by adding it to the function signature.
  *
  * @global array $_wp_post_type_features
  *
diff --git a/src/wp-includes/theme.php b/src/wp-includes/theme.php
index 2fb98bcb9d..5a9190d801 100644
--- a/src/wp-includes/theme.php
+++ b/src/wp-includes/theme.php
@@ -2357,6 +2357,8 @@ function get_theme_starter_content() {
  *              `disable-custom-font-sizes`, `editor-color-palette`, `editor-font-sizes`,
  *              `editor-styles`, and `wp-block-styles` features were added.
  * @since 5.3.0 The `html5` feature now also accepts 'script' and 'style'.
+ * @since 5.3.0 Formalized the existing and already documented ...$args parameter
+ *              by adding it to the function signature.
  *
  * @global array $_wp_theme_features
  *
@@ -2671,6 +2673,8 @@ function _custom_logo_header_styles() {
  *     get_theme_support( 'custom-header', 'width' );
  *
  * @since 3.1.0
+ * @since 5.3.0 Formalized the existing and already documented ...$args parameter
+ *              by adding it to the function signature.
  *
  * @global array $_wp_theme_features
  *
@@ -2791,6 +2795,8 @@ function _remove_theme_support( $feature ) {
  *     current_theme_supports( 'html5', 'comment-form' );
  *
  * @since 2.9.0
+ * @since 5.3.0 Formalized the existing and already documented ...$args parameter
+ *              by adding it to the function signature.
  *
  * @global array $_wp_theme_features
  *
diff --git a/src/wp-includes/widgets.php b/src/wp-includes/widgets.php
index 5efd467494..2378611b6f 100644
--- a/src/wp-includes/widgets.php
+++ b/src/wp-includes/widgets.php
@@ -344,6 +344,8 @@ function is_registered_sidebar( $sidebar_id ) {
  * parameter is an empty string.
  *
  * @since 2.2.0
+ * @since 5.3.0 Formalized the existing and already documented ...$params parameter
+ *              by adding it to the function signature.
  *
  * @global array $wp_registered_widgets            Uses stored registered widgets.
  * @global array $wp_registered_widget_controls    Stores the registered widget controls (options).
@@ -481,6 +483,8 @@ function wp_unregister_sidebar_widget( $id ) {
  * Registers widget control callback for customizing options.
  *
  * @since 2.2.0
+ * @since 5.3.0 Formalized the existing and already documented ...$params parameter
+ *              by adding it to the function signature.
  *
  * @global array $wp_registered_widget_controls
  * @global array $wp_registered_widget_updates
@@ -556,6 +560,8 @@ function wp_register_widget_control( $id, $name, $control_callback, $options = a
  * Registers the update callback for a widget.
  *
  * @since 2.8.0
+ * @since 5.3.0 Formalized the existing and already documented ...$params parameter
+ *              by adding it to the function signature.
  *
  * @global array $wp_registered_widget_updates
  *
@@ -588,6 +594,8 @@ function _register_widget_update_callback( $id_base, $update_callback, $options
  * Registers the form callback for a widget.
  *
  * @since 2.8.0
+ * @since 5.3.0 Formalized the existing and already documented ...$params parameter
+ *              by adding it to the function signature.
  *
  * @global array $wp_registered_widget_controls
  *
diff --git a/src/wp-includes/wp-db.php b/src/wp-includes/wp-db.php
index 64da5169e1..7ab4167520 100644
--- a/src/wp-includes/wp-db.php
+++ b/src/wp-includes/wp-db.php
@@ -1280,6 +1280,9 @@ class wpdb {
 	 *
 	 * @link https://secure.php.net/sprintf Description of syntax.
 	 * @since 2.3.0
+	 * @since 5.3.0 Formalized the existing and already documented ...$args parameter
+	 *              by updating the function signature to reflect this.
+	 *              This changes the second parameter from $args to ...$args.
 	 *
 	 * @param string      $query   Query statement with sprintf()-like placeholders
 	 * @param array|mixed $args    The array of variables to substitute into the query's placeholders
diff --git a/tests/phpunit/includes/abstract-testcase.php b/tests/phpunit/includes/abstract-testcase.php
index b31b7a2c90..d913213f38 100644
--- a/tests/phpunit/includes/abstract-testcase.php
+++ b/tests/phpunit/includes/abstract-testcase.php
@@ -899,6 +899,8 @@ abstract class WP_UnitTestCase_Base extends PHPUnit_Framework_TestCase {
 	 *
 	 * @since 2.5.0
 	 * @since 3.8.0 Moved from `Tests_Query_Conditionals` to `WP_UnitTestCase`.
+	 * @since 5.3.0 Formalized the existing ...$prop parameter by adding
+	 *              it to the function signature.
 	 *
 	 * @param string ...$prop Any number of WP_Query properties that are expected to be true for the current request.
 	 */
-- 
2.23.0.windows.1

