Skip to content

Hide boosts from Plugin Licenses - #3799

Merged
Crabcyborg merged 4 commits into
masterfrom
fix/boost-license-settings
Dec 2, 2026
Merged

Crabcyborg merged 4 commits into
masterfrom
fix/boost-license-settings

Conversation

@Crabcyborg

@Crabcyborg Crabcyborg commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Use the same eligibility check for the Plugin Licenses tab and its rows. Boosts use separate licensing and should not prompt for an activation key.

Testing

  1. Activate this change alongside the corresponding Formidable Lite and boost updater changes.
  2. Open Formidable Global Settings with a boost and a separately licensed add-on active. Verify that only the add-on has a license row.
  3. Deactivate the separately licensed add-on and verify the Plugin Licenses tab disappears when no eligible add-ons remain.

Summary by CodeRabbit

  • Bug Fixes
    • The Plugin Licenses section appears only when eligible license-requiring add-ons are available.
    • The license settings list excludes Formidable Pro, Boosts, add-ons covered by a parent license, and add-ons that do not require a license, keeping the displayed options focused on add-ons with their own license settings.

@coderabbitai

coderabbitai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The add-on license settings use a shared filter to select eligible add-ons. The filtered list controls whether the licenses section appears. The view continues license-row rendering for plugin entries without applying the removed exclusions.

Changes: Add-on license settings

Layer / File(s) Summary
Filter add-ons for license settings
classes/controllers/FrmAddonsController.php, tests/phpunit/misc/test_FrmAddonsController.php
A new public method excludes Formidable Pro, parent-license add-ons, add-ons that do not need a license, and Boosts. A test checks that the method excludes a Boost and retains an add-on that needs its own license.
Connect filtering to settings and rendering
classes/controllers/FrmAddonsController.php, classes/controllers/FrmSettingsController.php, classes/views/addons/settings.php
The license settings method uses the shared filter. The licenses section appears only when the add-on page is included and the filtered list is truthy. The view no longer skips the listed plugin types during license-row rendering.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: stephywells

Merge Risk: Minimal · up to 7ab93

This change hides Boosts from the Plugin Licenses tab and uses one eligibility check for the tab and its rows. No concrete merge-blocking risk was found. It should be activated together with the coordinated Boost updater change.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "Hide boosts from Plugin Licenses" matches the main change. The PR makes the Plugin Licenses tab and its rows use one eligibility check that excludes boosts, since boosts use separate licens…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "Hide boosts from Plugin Licenses" matches the main change. The PR makes the Plugin Licenses tab and its rows use one eligibility check that excludes boosts, since boosts use separate licensing and do not need an activation key. The added test confirms that boosts are excluded while a regular add-on that needs a license is kept. The title is short, specific, and does not use vague terms.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 7b1ee14 and 7ab93c2.

Files selected for processing: 4

  • classes/controllers/FrmAddonsController.php
  • classes/controllers/FrmSettingsController.php
  • classes/views/addons/settings.php
  • tests/phpunit/misc/test_FrmAddonsController.php
Files with no reviewable changes: 1

  • classes/views/addons/settings.php

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@deepsource-io

deepsource-io Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

DeepSource Code Review

We reviewed changes in d4bf9a3...7ab93c2 on this pull request. Below is the summary for the review, and you can see the individual issues we found as inline review comments.

See full review on DeepSource ↗

PR Report Card

Overall Grade   Security  

Reliability  

Complexity  

Hygiene  

Code Review Summary

Analyzer Status Updated (UTC) Details
PHP Dec 2, 2026 3:56p.m. Review ↗
JavaScript Dec 2, 2026 3:56p.m. Review ↗

Important

AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.

@Crabcyborg Crabcyborg added this to the 7.2 milestone Dec 2, 2026
@franky-the-going-merry franky-the-going-merry Bot added the franky-working Franky is actively reviewing this label Dec 2, 2026

@franky-the-going-merry franky-the-going-merry Bot left a comment

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.

Approve (one non-blocking test note). The Plugin Licenses tab and its rows now share one eligibility filter, and boosts are excluded from both.

Reproduced before and after with a throwaway probe test (not in the PR) that registers fake add-ons on frm_installed_addons (Pro, parent-licensed, no-license, boost, separately licensed) and renders get_settings_tabs() plus license_settings(). It checks the same two things the PR's test plan does:

  • Base (cad4d84): with only a boost registered, the Plugin Licenses tab is shown and has a "Some Boost" row. With a boost and a separate add-on, both get rows.
  • PR head (843e894): boost only → no tab. Boost + add-on → tab with only the add-on's row. Mixed set (Pro, boost, parent-licensed, no-license, add-on) → only the add-on's row. No add-ons → no tab, same as before. An object with no is_boost property still gets a row (the ! empty() guard holds).

Tests run: harness PHPUnit at 843e894 (Lite, PHP 8.4, -c phpunit.xml) → --group addons 130 tests / 369 assertions OK (1 skipped, pre-existing), --filter 'Settings|FrmAddon' 164 / 723 OK (1 skipped). CI skips PHPUnit on this PR; Psalm and Typos pass.

Checked: views/addons/settings.php is only included from license_settings(), so dropping its skip is safe now the list arrives pre-filtered. The Pro check is now slug or name in both places (before: name in the tab check, slug in the view), a harmless union. FrmAddon::$is_boost already exists on master.

Non-blocking:

  • No test pins the new filter. The diff adds get_plugins_for_license_settings() but no test file, so a future edit dropping the is_boost clause would pass CI. A short case in tests/phpunit/misc/test_FrmAddonsController.php that registers one boost and one normal add-on on frm_installed_addons and asserts only the normal one is returned would catch it.

Not exercised: a real boost plugin. is_boost is set at runtime from the add-ons feed (when Pro is licensed) or by the boost itself, so a Lite-only site relies on the companion boost updater change named in the PR's test plan; I did not run that or the front-end settings screen in a browser. Skills (code-review, security-review) not run; manual read of the 3-file diff, nothing user-supplied reaches output.

@franky-the-going-merry franky-the-going-merry Bot removed franky-review franky-working Franky is actively reviewing this labels Dec 2, 2026
@Crabcyborg

Copy link
Copy Markdown
Contributor Author

Non-blocking, no test pins the new filter: fixed in 7ab93c2. Added test_get_plugins_for_license_settings_excludes_boosts to tests/phpunit/misc/test_FrmAddonsController.php. It registers a boost and a normal add-on on frm_installed_addons and asserts only the normal one is returned. It fails when the is_boost clause is removed.

@franky-the-going-merry franky-the-going-merry Bot added the franky-working Franky is actively reviewing this label Dec 2, 2026

@franky-the-going-merry franky-the-going-merry Bot left a comment

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.

Approve (clean). My earlier non-blocking note is fixed in 7ab93c2: test_get_plugins_for_license_settings_excludes_boosts now pins the is_boost clause. Source is unchanged from the version I approved at 843e894 (the delta is the test plus a master merge); the whole 4-file diff re-read.

Tests run at 7ab93c2 (harness PHPUnit, Lite files copied over the harness checkout, PHP 8.4, -c phpunit.xml):

  • New test → OK (1 test, 1 assertion). With the || ! empty( $plugin->is_boost ) clause removed it fails ("two arrays are identical").
  • --group addons → 127 tests / 366 assertions OK (1 skipped, pre-existing); --filter 'Settings|FrmAddon' → 146 / 587 OK (1 skipped).
  • CI at this head: PHPUnit (7.4, 8.0, 8.2, 8.4), Psalm, Typos, Rector, Syntax all pass.

The before/after behaviour (boost-only site loses the Plugin Licenses tab; boost + separately licensed add-on shows only the add-on's row) was reproduced in my earlier review at 843e894 and the source behind it has not changed.

Not exercised: a real boost plugin (is_boost comes from the add-ons feed or the boost itself, so a Lite-only site depends on the companion boost updater change in the PR's test plan) and the front-end settings screen in a browser.

@franky-the-going-merry franky-the-going-merry Bot removed franky-review franky-working Franky is actively reviewing this labels Dec 2, 2026
@Crabcyborg
Crabcyborg merged commit 3630854 into master Dec 2, 2026
80 of 81 checks passed
@Crabcyborg
Crabcyborg deleted the fix/boost-license-settings branch December 2, 2026 18:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant