Skip to content

Fix activation with Query Monitor 4.1.2 - #642

Merged
JanJakes merged 1 commit into
trunkfrom
query-monitor-autoloader
Nov 27, 2026
Merged

JanJakes merged 1 commit into
trunkfrom
query-monitor-autoloader

Conversation

@JanJakes

@JanJakes JanJakes commented Nov 27, 2026 •

Copy link
Copy Markdown
Member

Summary

Fixes plugin activation with Query Monitor 4.1.2. The SQLite integration now loads Query Monitor's new autoload.php so it can start recording database queries early. Older releases continue to use Composer's vendor/autoload.php.

Why

Query Monitor 4.1.2 removed both its bundled Composer autoloader and the QM_PHP::vendor_nope notice. The SQLite integration treated the missing Composer file as an incomplete install and registered the removed callback. WordPress then tried to call it when rendering the Plugins screen after activation. Query Monitor changes · Failing end-to-end test on trunk

Summary by CodeRabbit

  • Bug Fixes
    • Improved Query Monitor compatibility across installations by using an available autoloader, including support for older setups.
    • Avoided registering a missing-autoloader notice when its handler is unavailable.

Load the class map autoloader shipped with Query Monitor 4.1.2 and keep the Composer fallback for older releases. Register the missing-dependencies notice only when Query Monitor provides it.

johnbillion/query-monitor@4.1.1...4.1.2
@coderabbitai

coderabbitai Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The Query Monitor eager loader now prefers the root autoloader, falls back to the vendor autoloader, and returns when neither is readable. It registers the missing-vendor admin notice only when its callback is callable.

Changes: Query Monitor loader

Layer / File(s) Summary
Autoloader selection and notice registration
packages/plugin-sqlite-database-integration/integrations/query-monitor/boot.php
The loader requires the readable root autoloader first and uses the readable vendor autoloader as a fallback. If neither is readable, it registers the admin notice only when QM_PHP::vendor_nope is callable, then returns.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Merge Risk: Minimal · up to d8430

The change fixes plugin activation with Query Monitor 4.1.2 and keeps support for older releases. No merge-blocking risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "Fix activation with Query Monitor 4.1.2" matches the main change. The boot.php change makes the SQLite integration load Query Monitor's new root autoload.php, fall back to vendor/autoload.p…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "Fix activation with Query Monitor 4.1.2" matches the main change. The boot.php change makes the SQLite integration load Query Monitor's new root autoload.php, fall back to vendor/autoload.php for older releases, and register QM_PHP::vendor_nope only when that callback is callable. This stops the activation failure that the PR objectives attribute to Query Monitor 4.1.2 removing the callback.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1032109a-f531-49f8-a10f-8013addb1a95
Commits

Reviewing files that changed from the base of the PR and between 758da32 and d843067.

Files selected for processing: 1

  • packages/plugin-sqlite-database-integration/integrations/query-monitor/boot.php

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

@JanJakes
JanJakes merged commit 7cf6b93 into trunk Nov 27, 2026
10 checks passed
@JanJakes
JanJakes deleted the query-monitor-autoloader branch November 27, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant