Skip to content

Report a missing plugin without PluginNotFoundException on Matomo before 5.7.0 - #84

Merged
snake14 merged 1 commit into
5.x-devfrom
fix-plugin-not-found-on-older-core
Oct 20, 2026
Merged

snake14 merged 1 commit into
5.x-devfrom
fix-plugin-not-found-on-older-core

Conversation

@snake14

@snake14 snake14 commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Description

On Matomo versions before 5.7.0, running apireference:generate-spec-file, apireference:generate-annotations or apireference:extract-api-method-info for a plugin that is not installed fails with Class "Piwik\Exception\PluginNotFoundException" not found instead of reporting that the plugin was not found.

The plugin now uses core's PluginNotFoundException when it exists and otherwise throws a plain exception with the same message and 404 code.

Issue No

NA

Steps to Replicate the Issue

  1. On Matomo 5.6 with ApiReference installed, run ./console apireference:generate-spec-file --plugin=NotARealPlugin.
  2. Expected: an error saying the plugin NotARealPlugin was not found.
  3. Actual: a fatal error saying the class Piwik\Exception\PluginNotFoundException was not found.

Checklist

  • [✔] Tested locally or on demo2/demo3?
  • [✔] 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?

@snake14 snake14 added the Needs Review For pull requests that need a code review. label Oct 20, 2026
@snake14
snake14 requested a review from a team October 20, 2026 04:39
@snake14
snake14 merged commit 312427b into 5.x-dev Oct 20, 2026
11 of 12 checks passed
@snake14
snake14 deleted the fix-plugin-not-found-on-older-core branch October 20, 2026 04:50
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