Skip to content

Staging release: v20260417.0#6923

Merged
sjinks merged 1 commit intostagingfrom
develop
Apr 17, 2026
Merged

Staging release: v20260417.0#6923
sjinks merged 1 commit intostagingfrom
develop

Conversation

@sjinks
Copy link
Copy Markdown
Member

@sjinks sjinks commented Apr 17, 2026

No description provided.

Copilot AI review requested due to automatic review settings April 17, 2026 14:53
@sjinks sjinks requested a review from a team as a code owner April 17, 2026 14:53
@sonarqubecloud
Copy link
Copy Markdown

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Staging release updating the bundled Query Monitor plugin to v4.0.6, including internal ID/menu handling adjustments and various encoding/output hardening changes.

Changes:

  • Bump Query Monitor version metadata/constants from 4.0.0 to 4.0.6 and update composer reference.
  • Introduce a shared QM_ArrayAccess trait and apply it across QM data objects for backward-compatible array access.
  • Update dispatcher/output code to use wp_json_encode() and refine panel/menu ID handling and HTML fallback output behavior.

Reviewed changes

Copilot reviewed 27 out of 30 changed files in this pull request and generated no comments.

Show a summary per file
File Description
query-monitor/wp-content/db.php Bumps drop-in header version to 4.0.6.
query-monitor/vendor/composer/installed.php Updates Query Monitor package reference hash.
query-monitor/vendor/composer/autoload_static.php Adds classmap entry for new QM_ArrayAccess trait.
query-monitor/readme.txt Updates stable tag to 4.0.6.
query-monitor/query-monitor.php Updates plugin version header and QM_VERSION constant to 4.0.6.
query-monitor/output/html/headers.php Adjusts panel-menu keys and uses raw collector IDs for child panels.
query-monitor/output/html/db_queries.php Updates menu keys/child placement to align with qm- prefixed menu keys + raw panel IDs.
query-monitor/output/html/db_dupes.php Moves submenu items under the updated qm-db_queries parent key.
query-monitor/output/html/db_components.php Moves submenu items under the updated qm-db_queries parent key.
query-monitor/output/html/db_callers.php Moves submenu items under the updated qm-db_queries parent key.
query-monitor/output/html/assets.php Removes early-return for empty assets and relies on type counts for menu rendering.
query-monitor/output/headers/php_errors.php Switches JSON encoding to wp_json_encode().
query-monitor/output/Headers.php Switches JSON encoding to wp_json_encode() for non-scalar header values.
query-monitor/dispatchers/REST.php Switches REST fatal output JSON encoding to wp_json_encode().
query-monitor/dispatchers/Html.php Adds fallback container output behavior; fixes concerned-hooks menu keying; hardens inline JSON encoding and number formatting.
query-monitor/dispatchers/AJAX.php Removes obsolete TODO and outputs JSON via wp_json_encode().
query-monitor/data/php_error.php Implements ArrayAccess via shared trait for DTO compatibility.
query-monitor/data/http/http_response.php Implements ArrayAccess via shared trait for DTO compatibility.
query-monitor/data/http/http_request.php Implements ArrayAccess via shared trait for DTO compatibility.
query-monitor/data/frame.php Implements ArrayAccess via shared trait for DTO compatibility.
query-monitor/data/callsite.php Implements ArrayAccess via shared trait for DTO compatibility.
query-monitor/data/callback.php Implements ArrayAccess via shared trait for DTO compatibility.
query-monitor/data/block_editor/post_block.php Implements ArrayAccess via shared trait for DTO compatibility.
query-monitor/classes/Util.php Updates deprecated JSON helper to use wp_json_encode().
query-monitor/classes/Data.php Replaces inline ArrayAccess methods with the shared trait.
query-monitor/classes/Collector_Assets.php Changes header sentinel to null and adjusts processing checks accordingly.
query-monitor/classes/Collector.php Changes id() to return a qm- prefixed string.
query-monitor/classes/ArrayAccess.php Adds the new shared QM_ArrayAccess trait.
query-monitor/assets/build/query-monitor.css Updates built CSS asset bundle.
Comments suppressed due to low confidence (1)

query-monitor/output/html/assets.php:61

  • admin_menu() now always calls array_sum( $data->types ), but QM_Collector_Assets::process() can exit early (or complete without calling log_type()) leaving $data->types unset/NULL. In that case this line will throw a TypeError in PHP 8+ (array_sum(): Argument #1 must be of type array, null given). Either restore the early return when there are no assets, or defensively default to an empty array/0 here (or initialize $this->data->types to an empty array in the collector).
		$type_label = $this->get_type_labels();

		$args = array(
			'title' => $type_label['label'],
			'count' => array_sum( $data->types ),
		);

@sjinks sjinks self-assigned this Apr 17, 2026
@sjinks sjinks merged commit 96e63ac into staging Apr 17, 2026
54 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants