Skip to content

Prepare for Matomo 6 - #275

Merged
sgiehl merged 12 commits into
6.x-devfrom
prepare6x
Aug 10, 2026
Merged

Prepare for Matomo 6#275
sgiehl merged 12 commits into
6.x-devfrom
prepare6x

Conversation

@sgiehl

@sgiehl sgiehl commented Aug 9, 2026

Copy link
Copy Markdown
Member

Description

Prepares CustomAlerts for Matomo 6. This is the accumulated prepare6x line, now targeting the new 6.x-dev maintenance branch.

Already on the branch from earlier sub-PRs (#266, #267, #269, #270, #273):

  • plugin.json at 6.0.0, requiring >=6.0.0-b1,<7.0.0-b1
  • Vue sources adapted to the Vite build, dist rebuilt, ESLint violations fixed
  • PluginTests run against a MySQL 8.0 / MariaDB 10.6 matrix; UI job on Node 24 and MySQL 8.0
  • Expected UI screenshots updated for the new headless Chrome and the teal brand
  • The unminified CustomAlerts.umd.js dropped, since only the minified bundle is ever served

Added here:

  • Changelog — a 6.0.0 entry, matching the file's existing dated single-list format.
  • Tests workflow — the PHP versions were pinned literals (8.1, 8.5) and would have drifted out of step with core. Replaced with the matomo6_min_php / matomo6_max_php aliases in the matrix, the UI job, the artifact-upload condition and the generate:test-action header comment.
  • phpstan.neonphpVersion was still 70200, so PHPStan reasoned about the code under PHP 7.2 rules rather than Matomo 6's 8.1 floor. Raised to 80100. PHPStan 2 additionally fails hard on excludePaths entries absent from the checkout, and github-action-tests is only ever checked out by the workflow (at the workspace root, not under the plugin), so it is now marked optional with (?).
  • Vue type-only importsCoreHome exports SiteRef as a type in Matomo 6, and Alert is an interface exported from ListAlerts.vue. Both were pulled in through value imports, which the Vite toolchain rejects under isolatedModules. The emitted bundle is unchanged.

6.x-dev was created at the 5.x-dev tip, so it carries three commits this branch predates (translations update, strict-comparison check). They come in with the merge; nothing was merged into prepare6x by hand.

Issue No

Related to the Matomo 6 plugin preparation effort.

Steps to Replicate the Issue

Not applicable — compatibility preparation, no user-facing behaviour change.

Checklist

  • [✔] Tested locally or on demo2/demo3?
  • [NA] New test case added/updated?
  • [NA] Are all newly added texts included via translation?
  • [NA] Are text sanitized properly? (Eg use of v-text v/s v-html for vue)
  • [✔] Version bumped?
  • [✔] I have understood, reviewed, and tested all AI outputs before use
  • [✔] All AI instructions respect security, IP, and privacy rules
  • [NA] Documentation updated?

AI Checklist

  • [✔] I have understood, reviewed, and tested all AI outputs before use
  • [✔] All AI instructions respect security, IP, and privacy rules

sgiehl and others added 12 commits July 9, 2026 14:43
Bump plugin version to 6.0.0 and require Matomo >=6.0.0-b1,<7.0.0-b1.
…violations (#266)

* Adapt Vue sources to the Vite build and rebuild dist for Matomo 6

Replaces a value re-export/import of a type-only entity so the esbuild-based Vite build can bundle it, and rebuilds the Vue dist files with the new toolchain.

* Rebuild Vue dist files for Vue 3.5

* Fix CustomAlerts Vue declaration type errors

Export the Alert interface and type the alerts list, replace duplicate v-model
model-value bindings with update handlers, drop a stray updateAlert arg, and
coerce optional alert fields.
* Run plugin tests against MySQL 8.0 and MariaDB 10.6

The workflow inherited the shared action's MySQL 5.7 default, which is below
Matomo's new minimum. Pin the database-backed jobs to the supported floor:
PluginTests now runs a MySQL 8.0 + MariaDB 10.6 matrix, and the UI/JS jobs run
on MySQL 8.0.

* Only upload plugin test artifacts for the MySQL matrix leg

PluginTests runs a MySQL + MariaDB matrix; the upload-artifacts condition
matched both legs and uploaded twice. Restrict the upload to the MySQL leg.
… Puppeteer 24) (#269)

* Update expected UI screenshots for the new headless Chrome (Node 24 / Puppeteer 24)

* Move mouse off the alert-condition dropdown before capturing

The reloaded-alert-condition tests open and expand the condition dropdown via jQuery
(page.evaluate), so the real mouse cursor is left resting over the dropdown from an
earlier click. Under Chrome 149 that gives whichever option is under the cursor a stray
:hover highlight in the screenshot. Move the mouse to a neutral position before capturing
so no option is highlighted.

* Sync corrected alert-condition screenshots (no stray dropdown hover)

* Run the plugin UI tests on Node 24

Match the Node 24 / Puppeteer 24 screenshot-testing stack; the UI job was still pinned to Node 16.
Teal brand screenshots on 6.x-dev plugin base; synced from matomo-org/matomo run 30405694397.
Matomo's Vue build no longer emits <Plugin>.umd.js. Only the minified
CustomAlerts.umd.min.js is ever served: PluginUmdAssetFetcher looks exclusively for
.umd.min.js, and development mode uses the .development.umd.js produced by
vue:build --watch.

The unminified bundle was a leftover from Vue CLI, whose lib build emitted it
alongside the minified one for free. See matomo-org/matomo#25027.
…ease]

The workflow pinned 8.1 and 8.5 as literals, so it would keep testing those
versions after core moves its supported range. matomo6_min_php and
matomo6_max_php resolve to core's current bounds in the shared action, which
keeps the matrix, the UI job and the artifact-upload condition in step with
core. The generate:test-action comment in the header carries the aliases too,
so regenerating the file reproduces it.
…_release]

phpVersion was still 70200, well below Matomo 6's PHP 8.1 floor, so PHPStan
reasoned about the code as if the 7.2 runtime rules applied. PHPStan 2 also
fails hard on excludePaths entries that are absent from the checkout, and
github-action-tests is only ever checked out by the workflow, so mark it
optional with (?).
CoreHome now exports SiteRef as a type, and Alert is an interface exported from
ListAlerts.vue. Both were pulled in through value imports, which the Vite
toolchain rejects under isolatedModules because esbuild compiles each module in
isolation and cannot tell a type re-export from a value one. The emitted bundle
is unchanged.
Brings in the three commits that landed on 5.x-dev after this branch was cut:
the Weblate translations update and the strict-comparison checks in
CustomAlerts::deleteAlertsForLogin() and Validator::checkUserHasPermissionForAlert().

Conflicts were the two version markers. plugin.json keeps 6.0.0 over the 5.3.3
bump, and CHANGELOG.md keeps both entries with 6.0.0 on top.
@sgiehl
sgiehl requested a review from a team August 9, 2026 13:32
Comment thread CHANGELOG.md
@@ -1,5 +1,6 @@
## Changelog

* 6.0.0 - 2026-08-09 - Compatibility with Matomo 6

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@sgiehl When should we release a new version ? The date should be of that day.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Guess we should do that when we release Matomo 6 beta. We might need to adjust the dates then again

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes we can do that

@AltamashShaikh AltamashShaikh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@sgiehl
sgiehl merged commit a54393a into 6.x-dev Aug 10, 2026
13 checks passed
@sgiehl
sgiehl deleted the prepare6x branch August 10, 2026 06:50
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.

3 participants