From 34c4137f4fdd5741e134050d35c5e648c40b523a Mon Sep 17 00:00:00 2001 From: Lachlan Reynolds Date: Fri, 26 Jun 2026 10:01:35 +1200 Subject: [PATCH 1/3] Removed eager fetching of matomo url, only calling on spec generation --- Specs/SpecGenerator.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Specs/SpecGenerator.php b/Specs/SpecGenerator.php index 4a97649..253668f 100644 --- a/Specs/SpecGenerator.php +++ b/Specs/SpecGenerator.php @@ -38,11 +38,6 @@ public function __construct(?PathResolver $specPathResolver = null, ?ArtifactWri { $this->specPathResolver = $specPathResolver ?? new PathResolver(); $this->artifactWriter = $artifactWriter ?? new ArtifactWriter(); - - // Set the constant for the current instance's URL - if (!defined('LOCAL_MATOMO_SERVER_URL')) { - define('LOCAL_MATOMO_SERVER_URL', SettingsPiwik::getPiwikUrl()); - } } /** @@ -77,6 +72,11 @@ public function generatePluginDoc(string $pluginName, string $format = 'json', s */ public function generateSpec(array $pluginNames, string $format = 'json', string $version = ApiReference::DEFAULT_SPEC_VERSION, bool $writeToFile = false): string { + // Set the constant for the current instance's URL + if (!defined('LOCAL_MATOMO_SERVER_URL')) { + define('LOCAL_MATOMO_SERVER_URL', SettingsPiwik::getPiwikUrl()); + } + BaseValidator::check('pluginNames', $pluginNames, [new NotEmpty()]); $currentPluginDir = Manager::getInstance()::getPluginDirectory('ApiReference'); From a07eee3c1dd85432d6cb57b03c30802c78479043 Mon Sep 17 00:00:00 2001 From: Lachlan Reynolds Date: Fri, 26 Jun 2026 14:17:31 +1200 Subject: [PATCH 2/3] Fix changelog --- CHANGELOG.md | 3 +++ plugin.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 86e01d1..69934d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ ## Changelog +5.0.4 - 29/06/2026 +- Removed eager fetching of Matomo URL + 5.0.3 - 08/06/2026 - Improved wording of authorization buttons and help text - Cleaned up styling on input fields diff --git a/plugin.json b/plugin.json index c0ebbd0..0030d09 100644 --- a/plugin.json +++ b/plugin.json @@ -1,7 +1,7 @@ { "name": "ApiReference", "description": "Modern interactive API documentation for Matomo based on OpenAPI (Swagger). Explore endpoints, parameters, and responses directly in your browser. ", - "version": "5.0.3", + "version": "5.0.4", "theme": false, "keywords": [ "API", From 4d33845407aeeb8838a18b4e430704c2069b43b3 Mon Sep 17 00:00:00 2001 From: lachiebol Date: Fri, 26 Jun 2026 14:35:39 +1200 Subject: [PATCH 3/3] Update CHANGELOG.md Co-authored-by: Altamash Shaikh --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 69934d3..708cb4c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,5 @@ ## Changelog -5.0.4 - 29/06/2026 +5.0.4 - 2026-06-29 - Removed eager fetching of Matomo URL 5.0.3 - 08/06/2026