Skip to content

Added ability to add documentation for inactive plugins, PG-4593#23

Merged
lachiebol merged 4 commits into
5.x-devfrom
PG-4593-document-inactive-plugins
Mar 11, 2026
Merged

Added ability to add documentation for inactive plugins, PG-4593#23
lachiebol merged 4 commits into
5.x-devfrom
PG-4593-document-inactive-plugins

Conversation

@lachiebol
Copy link
Copy Markdown
Contributor

@lachiebol lachiebol commented Mar 10, 2026

Description

Remove bypass for deactivated plugins -> instead we now check if its in the filesystem. Will be needed if we want to host on demo.matomo.cloud

Something like this should work now:

ddev matomo:console plugin:deactivate CrashAnalytics
ddev matomo:console openapidocs:generate-spec-file --plugin=CrashAnalytics --format=json --add-annotations --not-dry-run

This should error:
ddev matomo:console openapidocs:generate-spec-file --plugin=NotRealPlugin --format=json --add-annotations --not-dry-run

Issue No

Steps to Replicate the Issue

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?

@lachiebol lachiebol marked this pull request as ready for review March 10, 2026 04:21
@lachiebol lachiebol requested a review from a team March 10, 2026 04:21
@lachiebol lachiebol added the Needs Review For pull requests that need a code review. label Mar 10, 2026
Copy link
Copy Markdown
Contributor

@AltamashShaikh AltamashShaikh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lachiebol Will it now consider cloud only plugins also ?

What if we want to ignore those plugins like ConnectAccounts ?

Copy link
Copy Markdown
Contributor

@AltamashShaikh AltamashShaikh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Btw, this works as expected, but left 1 Q

@lachiebol
Copy link
Copy Markdown
Contributor Author

@lachiebol Will it now consider cloud only plugins also ?

What if we want to ignore those plugins like ConnectAccounts ?

Only if we specify in OpenApiDocs/config/plugins.php

Right now no cloud plugins are included. This command could technically run on those plugins.

But the list we use to generate the single file doesn't include cloud plugins.

@AltamashShaikh
Copy link
Copy Markdown
Contributor

@lachiebol Can this command not run any cloud plugins ? I am just concerned of Billing plugin so better to block it.

@lachiebol
Copy link
Copy Markdown
Contributor Author

@lachiebol Can this command not run any cloud plugins ? I am just concerned of Billing plugin so better to block it.

Should I do a blocklist? Currently they're not included in the generation command, but someone could technically query the other endpoint and retrieve it

@AltamashShaikh
Copy link
Copy Markdown
Contributor

@lachiebol Can this command not run any cloud plugins ? I am just concerned of Billing plugin so better to block it.

Should I do a blocklist? Currently they're not included in the generation command, but someone could technically query the other endpoint and retrieve it

Yes that would be good.

Comment thread Annotations/AnnotationGenerator.php Outdated
{
BaseValidator::check('plugin', $pluginName, [new NotEmpty()]);

if (in_array($pluginName, ['Billing', 'Cloud', 'ConnectAccounts'], true)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to add CDN and ProxySite too

Comment thread Specs/SpecGenerator.php Outdated
BaseValidator::check('plugin', $pluginName, [new NotEmpty()]);

foreach (explode(',', $pluginName) as $currentPluginName) {
if (in_array($currentPluginName, ['Billing', 'Cloud', 'ConnectAccounts'], true)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make a constant of this array and use that in both the place

@lachiebol lachiebol merged commit dd13be5 into 5.x-dev Mar 11, 2026
7 checks passed
@lachiebol lachiebol deleted the PG-4593-document-inactive-plugins branch March 11, 2026 04:44
lachiebol added a commit that referenced this pull request Mar 22, 2026
* Pulled out spec generation logic into common service, added new Task for spec generation

* Fixed plugin name logic and tests

* Fixed broken description logic from PR #23, added back in early return

* Add docs to public method

* Changed to daily and removed 'all' option

* fix tests

* Move blocklist validation down to generateSpec level

* removed config file, not needed

* restored config.php to normal state

* fix phpcs
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