Spec generation task, #PG-4593#26
Merged
Merged
Conversation
Contributor
Author
|
@AltamashShaikh Don't think we need the 'all' option for spec generation now, wonder if we should remove it? |
Contributor
@lachiebol Yes good to remove it. |
Contributor
Author
Removed now |
Contributor
AltamashShaikh
left a comment
There was a problem hiding this comment.
High-risk issues (blocking)
- Blocklist validation is no longer enforced on the main command/service path. GenerateSpecFile now calls the service in Commands/GenerateSpecFile.php:109, the service calls generateSpec() directly in Generation/
SpecGenerationService.php:60, and the blocklist check only exists in generatePluginDoc() at Specs/SpecGenerator.php:45. This changes externally observable behavior and defeats an existing safety rule.
Contributor
AltamashShaikh
left a comment
There was a problem hiding this comment.
High-risk issues (blocking)
- Deleting config/config.php likely breaks runtime loading of this plugin’s Composer dependencies. The deleted file only did require dirname(FILE, 2) . '/vendor/autoload.php';, but that is exactly the file Matomo loads
during plugin container setup via /var/www/html/work/matomo/core/Container/ContainerFactory.php:157. Without it, classes from swagger-php and phpdocumentor/reflection-docblock may not autoload when the plugin is used. There
is no replacement hook in OpenApiDocs.php:12 or elsewhere. - The new tests would not catch that regression because they manually require_once .../vendor/autoload.php at the top of the test files, for example in tests/Unit/TasksTest.php:14 and tests/Unit/Generation/
SpecGenerationServiceTest.php:14. That makes the test environment materially different from plugin runtime.
AltamashShaikh
approved these changes
Mar 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Had to fix description bug as well that was broken in this PR
Pulled out spec generation logic into a shared service so the command and the task can share a common method.
Issue No
Steps to Replicate the Issue
Checklist