Skip to content

Prepare for Matomo 6 - #60

Merged
snake14 merged 7 commits into
6.x-devfrom
prepare6x
Aug 10, 2026
Merged

Prepare for Matomo 6#60
snake14 merged 7 commits into
6.x-devfrom
prepare6x

Conversation

@sgiehl

@sgiehl sgiehl commented Aug 10, 2026

Copy link
Copy Markdown
Member

Description

Prepares the plugin for Matomo 6, in six commits.

Metadataplugin.json version 5.1.06.0.0 and require.matomo >=5.0.0,<6.0.0-b1
>=6.0.0-b1,<7.0.0-b1 (the -b1 lower bound is required so the plugin is not disabled against a beta
core), plus a 6.0.0 CHANGELOG entry. No composer.json, so no PHP constraint to raise there.

Updates/ — checked, not changed. core/Updater only runs update files where
installedVersion < fileVersion <= marker, so no file may sort above the new 6.0.0 marker.
5.1.0.php does not.

Plugin tests workflow — PHP aliases matomo5_*matomo6_* in the matrix, the UI job, the
upload-artifacts condition and the generate:test-action header comment. Added a database matrix for
MySQL 8.0 and MariaDB 10.6 (Matomo 6's new minimums), passed through as mysql-engine / mysql-version,
with matrix.database.engine == 'Mysql' added to upload-artifacts so only one leg uploads. The UI job
was on node-version: '16' while Matomo 6 requires Node 24 — bumped to '24' with explicit
mysql-engine: 'Mysql' / mysql-version: '8.0', without which the job fails with
Unknown database 'piwik_tests' before comparing any screenshot.

PHPCS / PHPStan workflows — both ran on PHP versions below Matomo 6's 8.1 floor. Bumped to 8.1.
These call setup-php directly, so the matomo6_* aliases do not apply to them.

PHPStan configurationexcludePaths listed github-action-tests, which does not exist in the
repository. PHPStan 2 (bundled with Matomo 6) fails hard on an entry that matches nothing, so the
analysis aborted with Invalid entry in excludePaths instead of running at all. Marked optional as
github-action-tests/ (?), which keeps it skipped in CI — where checkout_matomo.sh copies the action
workspace into the plugin directory — while letting it pass locally. tests/* is a wildcard and was left
untouched. phpVersion 7020080100.

One real finding, now fixed (only visible once the analysis actually ran):
Settings/EncryptedSlackOauthTokenSetting.php:63 guarded its saveValue() call with
$backend instanceof PluginSettingsTable && method_exists($backend, 'saveValue'). The method_exists
arm is dead — Piwik\Settings\Storage\Backend\PluginSettingsTable::saveValue() is declared in core 6.
Removed. (The same dead guard exists in plugin-MicrosoftTeams and is fixed in its own PR.)

Vue — rebuilt with the Vite toolchain; no TypeScript errors. Three tracked artefacts are no longer
produced by the single-pass Vite build — Slack.umd.js, Slack.umd.js.map and Slack.umd.min.js.map,
all still dated from the old Vue CLI build. Removed, with /vue/dist/*.umd.js and /vue/dist/*.map
added to .gitignore. Slack.umd.min.js and umd.metadata.json are regenerated.

Reviewed and kept: EnrichTriggeredAlerts.php:15 extends Controller, which the #[JsonResponse]
sweep matches — but that is the CustomAlerts plugin's controller, not a core JSON action, and the
class only overrides enrichTriggeredAlerts().

All six commits are marked [ignore_release]: this only establishes Matomo 6 compatibility and nothing
can be released for Matomo 6 until core ships.

Issue No

Related to the Matomo 6 plugin preparation effort.

Steps to Replicate the Issue

  1. Mount the plugin into a Matomo 6 checkout (PHP 8.1, MySQL 8.0, Node 24) and activate it —
    ./console plugin:activate Slack succeeds.
  2. ./console core:update reports no pending migrations.
  3. phpstan analyse -c plugins/Slack/phpstan.neon reports no errors (before this PR it aborted with
    Invalid entry in excludePaths).
  4. ./console vue:build Slack completes with no TypeScript errors.
  5. ./vendor/bin/phpcs --standard=phpcs.xml passes on PHP 8.1.
  6. ./console tests:run plugins/Slack/tests/Integration — 33 of 39 pass locally. The 6
    ScheduledReportsTest::testGetAlertMessage cases assert a hard-coded http://localhost/... URL and
    fail on any dev machine whose [tests] http_host is not localhost; CI uses localhost, so they
    pass there.

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?

@sgiehl sgiehl added the Needs Review For pull requests that need a code review. label Aug 10, 2026
@sgiehl
sgiehl requested a review from a team August 10, 2026 21:52
@snake14
snake14 merged commit f3b8ec5 into 6.x-dev Aug 10, 2026
13 checks passed
@snake14
snake14 deleted the prepare6x branch August 10, 2026 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review For pull requests that need a code review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants