Skip to content

Commit 2c8f89e

Browse files
authored
Query Monitor plugin support (#2415)
1 parent c27a053 commit 2c8f89e

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

packages/playground/wordpress-builds/src/sqlite-database-integration/get-sqlite-driver-module-details.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,10 @@ export function getSqliteDriverModuleDetails(
1919
url: string;
2020
} {
2121
switch (version) {
22-
2322
case 'develop':
2423
/** @ts-ignore */
2524
return {
26-
size: 215141,
25+
size: 215168,
2726
url: url_develop,
2827
};
2928
case 'v2.1.16':

packages/playground/wordpress/src/index.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,15 @@ class Playground_SQLite_Integration_Loader {
439439
require_once ${phpVar(SQLITE_MUPLUGIN_PATH)};
440440
}
441441
}
442+
/**
443+
* The Query Monitor plugin short-circuits in the CLI SAPI. However, in Playground,
444+
* the SAPI is always "cli" at the moment. Let's set a constant to disable the CLI
445+
* detection.
446+
*
447+
* @see https://github.com/WordPress/sqlite-database-integration/pull/212
448+
* @see https://github.com/WordPress/sqlite-database-integration/pull/215
449+
*/
450+
define('QM_TESTS', true);
442451
$wpdb = $GLOBALS['wpdb'] = new Playground_SQLite_Integration_Loader();
443452
444453
/**

0 commit comments

Comments
 (0)