Skip to content

De-assign user id with null instead of false (type-safe tracker) - #194

Merged
sgiehl merged 1 commit into
prepare6xfrom
tracker-34-typehints
Jul 28, 2026
Merged

De-assign user id with null instead of false (type-safe tracker)#194
sgiehl merged 1 commit into
prepare6xfrom
tracker-34-typehints

Conversation

@sgiehl

@sgiehl sgiehl commented Jul 27, 2026

Copy link
Copy Markdown
Member

The modernized, type-safe MatomoTracker types setUserId() as ?string; passing false coerces to '' and is rejected. Use null to de-assign a user id.

Part of Matomo 6 preparation (core moves matomo-php-tracker to the type-safe branch / future v4).

Checklist

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

The type-safe MatomoTracker types setUserId() as ?string; passing false
coerces to '' and is rejected. Use null to de-assign a user id, matching
the tracker's documented behaviour.
@sgiehl
sgiehl merged commit 8c994ae into prepare6x Jul 28, 2026
11 of 12 checks passed
@sgiehl
sgiehl deleted the tracker-34-typehints branch July 28, 2026 06:02
sgiehl added a commit that referenced this pull request Aug 10, 2026
* Prepare for Matomo 6

Bump plugin version to 6.0.0 and require Matomo >=6.0.0-b1,<7.0.0-b1.

* Run tests on same PHP versions as core (8.1, 8.5)

* Rebuild Vue dist files with the Vite build for Matomo 6 & fix ESLint violations (#192)

* Rebuild Vue dist files with the Vite build for Matomo 6

* Rebuild Vue dist files for Vue 3.5

* Fix VisitorGenerator Vue declaration type errors

Coerce numeric translate args.

* Run plugin tests against MySQL 8.0 and MariaDB 10.6 (#193)

* 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.

* De-assign user id with null instead of false (#194)

The type-safe MatomoTracker types setUserId() as ?string; passing false
coerces to '' and is rejected. Use null to de-assign a user id, matching
the tracker's documented behaviour.

* Remove the unminified Vue UMD bundle (#195)

Matomo's Vue build no longer emits <Plugin>.umd.js. Only the minified
VisitorGenerator.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.

* Require PHP 8.1 in composer.json [ignore_release]

The declared floor was still >=7.2.5, below Matomo 6's minimum of 8.1.0.
Raise it to match core and refresh the lock's content hash.

* Add changelog entry for 6.0.0 [ignore_release]

* Use the matomo6 PHP version aliases in the test workflow [ignore_release]

The matrix pinned 8.1 and 8.5 literally, so it would drift from core the
next time the supported range moves. The central action resolves
matomo6_min_php / matomo6_max_php to whatever Matomo 6 supports.
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