diff --git a/.github/workflows/matomo-tests.yml b/.github/workflows/matomo-tests.yml index 4f4d864..62105f7 100644 --- a/.github/workflows/matomo-tests.yml +++ b/.github/workflows/matomo-tests.yml @@ -1,7 +1,7 @@ # Action for running tests # This file has been automatically created. # To recreate it you can run this command -# ./console generate:test-action --plugin="QueuedTracking" --php-versions="matomo5_min_php,matomo5_max_php" --enable-redis --schedule-cron="0 2 * * 6" +# ./console generate:test-action --plugin="QueuedTracking" --php-versions="matomo6_min_php,matomo6_max_php" --enable-redis --schedule-cron="0 2 * * 6" name: Plugin QueuedTracking Tests @@ -37,8 +37,11 @@ jobs: strategy: fail-fast: false matrix: - php: [ 'matomo5_min_php', 'matomo5_max_php' ] + php: [ 'matomo6_min_php', 'matomo6_max_php' ] target: ['minimum_required_matomo', 'maximum_supported_matomo'] + database: + - { engine: 'Mysql', version: '8.0' } + - { engine: 'Mariadb', version: '10.6' } steps: - uses: actions/checkout@v3 with: @@ -52,10 +55,12 @@ jobs: plugin-name: 'QueuedTracking' php-version: ${{ matrix.php }} test-type: 'PluginTests' + mysql-engine: ${{ matrix.database.engine }} + mysql-version: ${{ matrix.database.version }} matomo-test-branch: ${{ matrix.target }} redis-service: true artifacts-pass: ${{ secrets.ARTIFACTS_PASS }} - upload-artifacts: ${{ matrix.php == 'matomo5_min_php' && matrix.target == 'maximum_supported_matomo' }} + upload-artifacts: ${{ matrix.php == 'matomo6_min_php' && matrix.target == 'maximum_supported_matomo' && matrix.database.engine == 'Mysql' }} UI: runs-on: ubuntu-24.04 steps: @@ -69,8 +74,10 @@ jobs: plugin-name: 'QueuedTracking' matomo-test-branch: 'maximum_supported_matomo' test-type: 'UI' - php-version: 'matomo5_min_php' - node-version: '16' + mysql-engine: 'Mysql' + mysql-version: '8.0' + php-version: 'matomo6_min_php' + node-version: '24' redis-service: true artifacts-pass: ${{ secrets.ARTIFACTS_PASS }} upload-artifacts: true diff --git a/.github/workflows/phpcs.yml b/.github/workflows/phpcs.yml index 5331d9d..16f66e0 100644 --- a/.github/workflows/phpcs.yml +++ b/.github/workflows/phpcs.yml @@ -26,7 +26,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '7.4' + php-version: '8.1' tools: cs2pr - name: Install dependencies run: diff --git a/CHANGELOG.md b/CHANGELOG.md index 1310295..890c944 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ ## Changelog +6.0.0 - 2026-08-09 +- Compatibility with Matomo 6 + 5.2.0 - 2025-11-25 - No longer disable Provider plugin automatically. If performance issues occur, please disable it manually or install an ASN geolocation database (https://matomo.org/faq/how-to/setting-up-accurate-visitors-geolocation/). diff --git a/Tasks.php b/Tasks.php index a1438bd..65cfc81 100644 --- a/Tasks.php +++ b/Tasks.php @@ -100,9 +100,9 @@ public function optimizeQueueTable() $prefix = Common::prefixTable(MySQL::QUEUED_TRACKING_TABLE_PREFIX); $tables = $db->fetchCol("SHOW TABLES LIKE '" . $prefix . "%'"); - $force = Db::isOptimizeInnoDBSupported(); + $force = Db\Schema::getInstance()->isOptimizeInnoDBSupported(); // if supported, then we want to force it, as it is quite important to execute this - Db::optimizeTables($tables, $force); + Db\Schema::getInstance()->optimizeTables($tables, $force); } } } diff --git a/plugin.json b/plugin.json index d932228..8f179b0 100644 --- a/plugin.json +++ b/plugin.json @@ -1,13 +1,13 @@ { "name": "QueuedTracking", - "version": "5.2.0", + "version": "6.0.0", "description": "Scale your large traffic Matomo service by queuing tracking requests in Redis or MySQL for better performance and reliability when experiencing peaks.", "theme": false, "keywords": ["tracker", "tracking", "queue", "redis"], "license": "GPL v3+", "homepage": "https://matomo.org", "require": { - "matomo": ">=5.0.0-b1,<6.0.0-b1" + "matomo": ">=6.0.0-b1,<7.0.0-b1" }, "support": { "email": "hello@matomo.org", diff --git a/tests/UI/QueuedTrackingSettings_spec.js b/tests/UI/QueuedTrackingSettings_spec.js index d167d55..f6919ac 100644 --- a/tests/UI/QueuedTrackingSettings_spec.js +++ b/tests/UI/QueuedTrackingSettings_spec.js @@ -34,12 +34,24 @@ describe("QueuedTrackingSettings", function () { }); it("should show an error if queue is enabled and redis connection is wrong", async function () { - await page.click('#queueEnabled + span'); + // Click the checkbox input directly: clicking the label/span is flaky under the new headless + // Chrome and does not reliably flip the checkbox. + const queueEnabledInput = await page.waitForSelector('#queueEnabled'); + await queueEnabledInput.evaluate(el => el.click()); await page.type('input[name="redisPort"]', '1'); - await (await page.jQuery('.card-content:contains(\'QueuedTracking\') .pluginsSettingsSubmit')).click(); - await page.waitForSelector('.confirm-password-modal.open', { visible: true }); - await page.type('.confirm-password-modal.open input[type=password]', superUserPassword); - await (await page.jQuery('.confirm-password-modal .confirm-password-btn:visible')).click(); + + // JS click: a native click on the submit button is flaky under the new headless Chrome. + const submitButton = await page.jQuery('.card-content:contains(\'QueuedTracking\') .pluginsSettingsSubmit'); + await submitButton.evaluate(el => el.click()); + + // Saving opens the password-confirmation modal. Scope to the open modal (the page renders + // several .confirm-password-modal instances) and JS-click confirm (native clicks are flaky). + await page.waitForSelector('.confirm-password-modal.modal.open #currentUserPassword', { visible: true }); + await page.waitForTimeout(250); + await page.type('.confirm-password-modal.modal.open #currentUserPassword', superUserPassword); + const confirmButton = await page.waitForSelector('.confirm-password-modal.modal.open .confirm-password-btn', { visible: true }); + await confirmButton.evaluate(el => el.click()); + await page.waitForNetworkIdle(); // hide all cards, except of QueueTracking await page.evaluate(function(){ diff --git a/tests/UI/expected-ui-screenshots/QueuedTrackingSettings_settings_page.png b/tests/UI/expected-ui-screenshots/QueuedTrackingSettings_settings_page.png index ce124a4..e1b71ca 100644 Binary files a/tests/UI/expected-ui-screenshots/QueuedTrackingSettings_settings_page.png and b/tests/UI/expected-ui-screenshots/QueuedTrackingSettings_settings_page.png differ diff --git a/tests/UI/expected-ui-screenshots/QueuedTrackingSettings_settings_page_sentinel.png b/tests/UI/expected-ui-screenshots/QueuedTrackingSettings_settings_page_sentinel.png index 78d3f9a..8f69423 100644 Binary files a/tests/UI/expected-ui-screenshots/QueuedTrackingSettings_settings_page_sentinel.png and b/tests/UI/expected-ui-screenshots/QueuedTrackingSettings_settings_page_sentinel.png differ diff --git a/tests/UI/expected-ui-screenshots/QueuedTrackingSettings_settings_save_error.png b/tests/UI/expected-ui-screenshots/QueuedTrackingSettings_settings_save_error.png index 958dfa7..199a820 100644 Binary files a/tests/UI/expected-ui-screenshots/QueuedTrackingSettings_settings_save_error.png and b/tests/UI/expected-ui-screenshots/QueuedTrackingSettings_settings_save_error.png differ