Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
a7a414f
Derive element shapes for `T[]` hashes in HashNotationVisitor
westonruter Oct 18, 2026
48505d1
Document WP_Block_Processor::extract_full_block_and_advance() as retu…
westonruter Oct 18, 2026
84e119b
Document the block lists resolve_pattern_blocks() takes and returns
westonruter Oct 18, 2026
745e61d
Read a `Required.` sentence as marking a hash key required
westonruter Oct 18, 2026
d335166
Mark the block keys resolve_pattern_blocks() takes as required
westonruter Oct 18, 2026
0654a0f
Regenerate baselines
westonruter Oct 18, 2026
80c3b18
Mark the Categories widget's display arguments as required
westonruter Oct 18, 2026
a06dd95
Check the nesting depth of a bare `array` entry for an `array[]` element
westonruter Oct 18, 2026
1b38fba
Prefer a bare `array` over a `T[]` member when choosing a shape's target
westonruter Oct 18, 2026
b106227
Match the `Required.` marker case-insensitively, as `Optional.` is
westonruter Oct 18, 2026
c1535e9
Correct the README's derived shape for `parse_blocks()`
westonruter Oct 18, 2026
099446c
Document the `type` of each settings error as always set
westonruter Oct 18, 2026
1fd6f81
Merge branch 'trunk' into phpstan/hash-notation-typed-arrays
westonruter Oct 30, 2026
1e7ec47
Merge branch 'trunk' of https://github.com/WordPress/wordpress-develo…
westonruter Oct 30, 2026
8348dac
Merge branch 'trunk' into phpstan/hash-notation-typed-arrays
westonruter Nov 1, 2026
12b0e83
Match element types case-sensitively except for atomic names
westonruter Nov 1, 2026
a199f46
Compare element types as parsed types
westonruter Nov 1, 2026
39974b5
Keep the declared spelling of a hash's element type
westonruter Nov 1, 2026
6840924
Write a union element type back without parentheses
westonruter Nov 1, 2026
9989fc0
Skip element hashes that only restate the declared type
westonruter Nov 1, 2026
19bb729
Cache parsed and normalized types in the hash notation visitor
westonruter Nov 1, 2026
57d04e8
Drop a redundant alternative from the Required marker pattern
westonruter Nov 1, 2026
8afba99
Correct the rationale for case-sensitive element matching
westonruter Nov 1, 2026
60bcbc5
Stop documenting href as required for resource hints and preloads
westonruter Nov 1, 2026
cedb55d
Document user_id as optional for wp_initialize_site()
westonruter Nov 1, 2026
e8e7480
Restore the Required marker on href for resource hints
westonruter Nov 1, 2026
19cab9c
Match the Required marker case-sensitively
westonruter Nov 1, 2026
c395827
Leave hashes on template types untranslated
westonruter Nov 2, 2026
ea00f8f
Treat a class's template types as in scope for its members
westonruter Nov 2, 2026
79d46a5
Match the class of a class constant type in any case
westonruter Nov 2, 2026
8d25089
Leave the blocks resolve_pattern_blocks() returns open to other keys
westonruter Nov 2, 2026
d769064
Treat a function's template types as in scope for the hooks it calls
westonruter Nov 2, 2026
2e93445
Match element types whose union members are in another order
westonruter Nov 2, 2026
24455ed
Find markers in a nested hash's intro after text before its brace
westonruter Nov 2, 2026
ea82191
Note the empty admin email of a site initialized without a user
westonruter Nov 2, 2026
2311b37
Keep the leading backslash of class names inside a namespace
westonruter Nov 2, 2026
0872bbc
Keep the leading backslash of class names after a use import
westonruter Nov 2, 2026
8296b79
Describe the return values of the visitor's newer methods
westonruter Nov 2, 2026
d7e7ec4
Leave hashes on type aliases untranslated, as on templates
westonruter Nov 2, 2026
d5d6384
Say which blocks keep their other keys in resolve_pattern_blocks()
westonruter Nov 3, 2026
3c8148f
Merge branch 'trunk' into phpstan/hash-notation-typed-arrays
westonruter Nov 3, 2026
5f73970
Type the local type names in the visitor as lowercase strings
westonruter Nov 3, 2026
19d6bfc
Drop a redundant escape from the nested array pattern
westonruter Nov 3, 2026
0f79488
Link the block class from the resolve_pattern_blocks() hashes
westonruter Nov 3, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/wp-admin/includes/template.php
Original file line number Diff line number Diff line change
Expand Up @@ -1907,7 +1907,7 @@ function add_settings_error( $setting, $code, $message, $type = 'error' ) {
* @type string $code Slug-name to identify the error. Used as part of 'id' attribute in HTML output.
* @type string $message The formatted message text to display to the user (will be shown inside styled
* `<div>` and `<p>` tags).
* @type string $type Optional. Message type, controls HTML class. Possible values include 'error',
* @type string $type Message type, controls HTML class. Possible values include 'error',
* 'success', 'warning', 'info'. Default 'error'.
* }
* }
Expand Down
36 changes: 34 additions & 2 deletions src/wp-includes/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -1928,8 +1928,40 @@ function traverse_and_serialize_block( $block, $pre_callback = null, $post_callb
* @since 6.6.0
* @since 7.0.0 Adds metadata to attributes of single-pattern container blocks.
*
* @param array $blocks An array blocks.
* @return array An array of blocks with patterns replaced by their content.
* @param array[] $blocks {
* An array of blocks.
*
* @type array ...$0 {
* An associative array of a single parsed block object. See {@see WP_Block_Parser_Block}.
*
* @type string|null $blockName Required. Name of block.
* @type array $attrs Required. Attributes from block comment delimiters.
* @type array[] $innerBlocks Required. List of inner blocks. An array of arrays that
* have the same structure as this one.
* @type string $innerHTML Required. HTML from inside block comment delimiters.
* @type array $innerContent Required. List of string fragments and null markers where
* inner blocks were found.
* }
* }
* @return array[] {
* An array of blocks with patterns replaced by their content.
*
* @type array ...$0 {
* An associative array of a single parsed block object. See {@see WP_Block_Parser_Block}.
*
* @type string|null $blockName Name of block.
* @type array $attrs Attributes from block comment delimiters.
* @type array[] $innerBlocks List of inner blocks. An array of arrays that
* have the same structure as this one.
* @type string $innerHTML HTML from inside block comment delimiters.
* @type array $innerContent List of string fragments and null markers where
* inner blocks were found.
* @type mixed ...$key Any other keys a block passed in carries, which
* are kept, except where a `core/pattern` block is
* replaced by its pattern's blocks, or removed as
* recursive.
* }
* }
*/
function resolve_pattern_blocks( $blocks ) {
static $inner_content;
Expand Down
3 changes: 2 additions & 1 deletion src/wp-includes/general-template.php
Original file line number Diff line number Diff line change
Expand Up @@ -4073,7 +4073,8 @@ function wp_preload_resources() {
* @type array ...$0 {
* Array of resource attributes.
*
* @type string $href URL to include in resource preloads. Required.
* @type string $href URL to include in resource preloads. May be omitted
* for an image preloaded by its `$imagesrcset`.
* @type string $as How the browser should treat the resource
* (`script`, `style`, `image`, `document`, etc).
* @type string $crossorigin Indicates the CORS policy of the specified resource.
Expand Down
4 changes: 3 additions & 1 deletion src/wp-includes/ms-site.php
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,9 @@ function wp_validate_site_data( $errors, $data, $old_site = null ) {
* @param array $args {
* Optional. Arguments to modify the initialization behavior.
*
* @type int $user_id Required. User ID for the site administrator.
* @type int $user_id User ID for the site administrator. Default 0, in which
* case the site is created without an administrator
* and with an empty admin email address.
* @type string $title Site title. Default is 'Site %d' where %d is the
* site ID.
* @type array $options Custom option $key => $value pairs to use. Default
Expand Down
8 changes: 4 additions & 4 deletions src/wp-includes/widgets/class-wp-widget-categories.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ public function __construct() {
* @param array $args {
* Display arguments.
*
* @type string $before_widget HTML markup to prepend to each widget in the sidebar.
* @type string $after_widget HTML markup to append to each widget in the sidebar.
* @type string $before_title HTML markup to prepend to the widget title when displayed.
* @type string $after_title HTML markup to append to the widget title when displayed.
* @type string $before_widget Required. HTML markup to prepend to each widget in the sidebar.
* @type string $after_widget Required. HTML markup to append to each widget in the sidebar.
* @type string $before_title Required. HTML markup to prepend to the widget title when displayed.
* @type string $after_title Required. HTML markup to append to the widget title when displayed.
* }
* @param array $instance {
* Settings for the current Categories widget instance.
Expand Down
Loading
Loading