Commit 8e44ca2c34 for wordpress.org
commit 8e44ca2c34a31808d274a6d7b00295401af11863
Author: westonruter <westonruter@git.wordpress.org>
Date: Mon Sep 21 22:20:49 2026 +0000
Build/Test Tools: Read hash notation on hook docblocks.
The visitor that translates hash notation into a PHPStan shape only entered a function-like node, and a hook's docblock is attached to the statement that fires the hook rather than to a function. Every hash core writes there was left as free text, so the value a filter handed back stayed a bare `array`. This undid, at the call, the shape the enclosing function's own hash had just established.
The visitor now considers every node carrying a docblock, and `HookDocBlock::parseHookDocs()` runs it over the files it parses itself, so a hook is typed alike wherever it is fired. One baselined message is re-rendered as a result.
Trusting these hashes surfaced one inaccurate docblock. The array the `dynamic_sidebar_params` filter passes is positional, but its hash named the two entries `$args` and `$widget_args`, keys the array never has. They are now documented as `$0` and `...$1`.
Developed in https://github.com/WordPress/wordpress-develop/pull/13644.
Follow-up to r62939, r63420.
Props westonruter, swissspidy.
See #65817.
Built from https://develop.svn.wordpress.org/trunk@63789
git-svn-id: http://core.svn.wordpress.org/trunk@62961 1a063a9b-81f0-0310-95a4-ce76da25c4cd
diff --git a/wp-includes/version.php b/wp-includes/version.php
index 828ec5c0b5..052e570afc 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
-$wp_version = '7.2-alpha-63788';
+$wp_version = '7.2-alpha-63789';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
diff --git a/wp-includes/widgets.php b/wp-includes/widgets.php
index c88727e812..5e679f4b92 100644
--- a/wp-includes/widgets.php
+++ b/wp-includes/widgets.php
@@ -790,7 +790,9 @@ function dynamic_sidebar( $index = 1 ) {
* @see register_sidebar()
*
* @param array $params {
- * @type array $args {
+ * The arguments the display callback is called with, in order.
+ *
+ * @type array $0 {
* An array of widget display arguments.
*
* @type string $name Name of the sidebar the widget is assigned to.
@@ -804,8 +806,8 @@ function dynamic_sidebar( $index = 1 ) {
* @type string $widget_id ID of the widget.
* @type string $widget_name Name of the widget.
* }
- * @type array $widget_args {
- * An array of multi-widget arguments.
+ * @type array ...$1 {
+ * The parameters the widget was registered with, such as the multi-widget arguments.
*
* @type int $number Number increment used for multiples of the same widget.
* }