Skip to content

ModuleInstaller 1.6.0: Module Sets, bulk CP UI, mtools consumer, DevOps baseline - #2

Merged
mambax7 merged 3 commits into
XoopsModules27x:masterfrom
mambax7:master
Jul 25, 2026
Merged

ModuleInstaller 1.6.0: Module Sets, bulk CP UI, mtools consumer, DevOps baseline#2
mambax7 merged 3 commits into
XoopsModules27x:masterfrom
mambax7:master

Conversation

@mambax7

@mambax7 mambax7 commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

Release 1.6.0-Stable of ModuleInstaller: bulk module management and Module Sets for focused testing, as a proper mtools consumer, with Control Panel chrome only (no legacy install-wizard shell).

Highlights

  • Module Sets (YAML under XOOPS_VAR_PATH): create/edit/import/export, snapshot actives, Focus/activate/deactivate/install/uninstall with dry-run and protected-module rules
  • Bulk tabs via AdminBulkPage::serve(): install, update, activate, deactivate, uninstall — filter, sticky “N selected”, Apply set, CSRF, per-module result reports
  • Installer home dashboard (counts, updates, last Focus snapshot) + optional sample module sets (e.g. PM / Profile / Protector)
  • mtools ≥ 1.2.0: bootstrap, lifecycle hooks, UtilityMtools\Common\SysUtility; removed local class/Common/* forks
  • UI: CP look & feel from ModuleAdmin/admin theme; scoped assets/css/admin.css only; logos, even/odd rows, set edit polish
  • Cleanup: removed extras/, InstallWizard / install_tpl / prototype / English install.php language baggage
  • DevOps baseline (module-devops): Composer QA, PHPStan/PHPUnit/CS-Fixer/Rector, .github CI/release, stubs

Requirements

  • XOOPS ≥ 2.5.12, PHP ≥ 8.2, mtools ≥ 1.2.0 (installed; active not required)

Docs

  • README.md, CHANGELOG.md, docs/changelog.txt, docs/TUTORIAL.md, docs/readme.txt

Test plan

  • Install/update module with mtools present
  • Bulk Install/Update/Activate/Deactivate/Uninstall (select, filter, Continue, result log)
  • Module Sets: edit membership, Apply Focus, restore snapshot
  • Load sample set (PM, Profile & Protector) from Installer home
  • Confirm CP nav/footer match admin theme (no wizard CSS bleed)
  • composer install && composer test (or site PHPUnit) on unit suite

…ps baseline

## Summary

Release **1.6.0-Stable** of ModuleInstaller: bulk module management and **Module Sets** for focused testing, as a proper **mtools** consumer, with Control Panel chrome only (no legacy install-wizard shell).

### Highlights
- **Module Sets** (YAML under `XOOPS_VAR_PATH`): create/edit/import/export, snapshot actives, Focus/activate/deactivate/install/uninstall with dry-run and protected-module rules
- **Bulk tabs** via `AdminBulkPage::serve()`: install, update, activate, deactivate, uninstall — filter, sticky “N selected”, Apply set, CSRF, per-module result reports
- **Installer home** dashboard (counts, updates, last Focus snapshot) + optional **sample module sets** (e.g. PM / Profile / Protector)
- **mtools ≥ 1.2.0**: bootstrap, lifecycle hooks, `Utility` → `Mtools\Common\SysUtility`; removed local `class/Common/*` forks
- **UI**: CP look & feel from ModuleAdmin/admin theme; scoped `assets/css/admin.css` only; logos, even/odd rows, set edit polish
- **Cleanup**: removed `extras/`, InstallWizard / `install_tpl` / prototype / English `install.php` language baggage
- **DevOps baseline** (`module-devops`): Composer QA, PHPStan/PHPUnit/CS-Fixer/Rector, `.github` CI/release, stubs

### Requirements
- XOOPS ≥ 2.5.12, PHP ≥ 8.2, mtools ≥ 1.2.0 (installed; active not required)

### Docs
- `README.md`, `CHANGELOG.md`, `docs/changelog.txt`, `docs/TUTORIAL.md`, `docs/readme.txt`

## Test plan
- [ ] Install/update module with mtools present
- [ ] Bulk Install/Update/Activate/Deactivate/Uninstall (select, filter, Continue, result log)
- [ ] Module Sets: edit membership, Apply Focus, restore snapshot
- [ ] Load sample set (PM, Profile & Protector) from Installer home
- [ ] Confirm CP nav/footer match admin theme (no wizard CSS bleed)
- [ ] `composer install` && `composer test` (or site PHPUnit) on unit suite
Copilot AI review requested due to automatic review settings July 24, 2026 15:10
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry @mambax7, your pull request is larger than the review limit of 150000 diff characters

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 106 files, which is 6 over the limit of 100.

To get a review, narrow the scope:
• coderabbit review --committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 51b87f23-98a3-4a86-9ae4-f29d97789349

📥 Commits

Reviewing files that changed from the base of the PR and between 8974261 and 538a5e7.

📒 Files selected for processing (126)
  • .editorconfig
  • .git-blame-ignore-revs
  • .gitattributes
  • .github/CODE_OF_CONDUCT.md
  • .github/CONTRIBUTING.md
  • .github/FUNDING.yml
  • .github/ISSUE_TEMPLATE/bug.yml
  • .github/ISSUE_TEMPLATE/config.yml
  • .github/PULL_REQUEST_TEMPLATE.md
  • .github/SECURITY.md
  • .github/dependabot.yml
  • .github/workflows/ci.yml
  • .github/workflows/dependabot-auto-merge.yml
  • .github/workflows/release.yml
  • .github/workflows/sonar.yml
  • .gitignore
  • .php-cs-fixer.dist.php
  • CHANGELOG.md
  • LICENSE
  • README.md
  • admin/about.php
  • admin/activate.php
  • admin/admin_footer.php
  • admin/admin_header.php
  • admin/deactivate.php
  • admin/index.php
  • admin/install.php
  • admin/menu.php
  • admin/sets.php
  • admin/uninstall.php
  • admin/update.php
  • assets/css/admin.css
  • assets/css/index.php
  • assets/css/reset.css
  • assets/css/style.css
  • assets/images/icons/16/index.php
  • assets/images/icons/32/index.php
  • assets/images/icons/index.php
  • assets/images/index.php
  • assets/img/index.php
  • assets/index.php
  • assets/js/index.php
  • assets/js/prototype.js
  • assets/js/xo-installer.js
  • bootstrap.php
  • class/AdminBulkPage.php
  • class/Common/Breadcrumb.php
  • class/Common/Configurator.php
  • class/Common/FilesManagement.php
  • class/Common/ServerStats.php
  • class/Common/SysUtility.php
  • class/Common/VersionChecks.php
  • class/Common/index.php
  • class/Helper.php
  • class/InstallWizard.php
  • class/ModuleActionResult.php
  • class/ModuleActionService.php
  • class/ModuleCatalog.php
  • class/Set/ModuleSet.php
  • class/Set/ModuleSetApplier.php
  • class/Set/ModuleSetRepository.php
  • class/Set/ModuleSetResolver.php
  • class/Set/index.php
  • class/Utility.php
  • class/index.php
  • composer.json
  • config/config.php
  • config/icons.php
  • config/imageconfig.php
  • config/index.php
  • config/paths.php
  • docs/TUTORIAL.md
  • docs/changelog.txt
  • docs/index.php
  • docs/lang_diff.txt
  • docs/readme.txt
  • extras/Original Core 2.5.7 files/index.php
  • extras/index.php
  • extras/main.php
  • extras/modulesadmin.php
  • extras/readme.txt
  • include/common.inc.php
  • include/common.php
  • include/config.php
  • include/index.php
  • include/install_tpl.php
  • include/mtools_dependency.php
  • include/oninstall.php
  • include/onuninstall.php
  • include/onupdate.php
  • include/page.php
  • index.php
  • language/english/admin.php
  • language/english/common.php
  • language/english/help/help.tpl
  • language/english/help/index.php
  • language/english/index.php
  • language/english/install.php
  • language/english/main.php
  • language/english/modinfo.php
  • language/index.php
  • phpstan-baseline.neon
  • phpstan-bootstrap.php
  • phpstan.neon.dist
  • phpunit.xml.dist
  • preloads/autoloader.php
  • preloads/core.php
  • rector.php
  • scripts/smoke_catalog.php
  • sonar-project.properties
  • stubs/xoops.stub
  • testdata/english/sets/pm-profile-protector.yml
  • testdata/index.php
  • tests/Integration/.gitkeep
  • tests/Unit/class/HelperTest.php
  • tests/Unit/class/ModuleActionResultTest.php
  • tests/Unit/class/Set/ModuleSetApplierTest.php
  • tests/Unit/class/Set/ModuleSetRepositoryTest.php
  • tests/Unit/class/Set/ModuleSetResolverTest.php
  • tests/Unit/class/Set/ModuleSetTest.php
  • tests/Unit/preloads/ModuleinstallerCorePreloadTest.php
  • tests/bootstrap.php
  • tests/helpers/RequiresXoops.php
  • tests/helpers/detect-dirname.php
  • tests/index.php
  • xoops_version.php

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands.

Correctness:
- verify real post-action state via a fresh DB read for install/uninstall/
  activate/deactivate rather than reporting OK whenever the core call did
  not throw; an unverifiable state is now a failure, and deactivation must
  leave the module installed and inactive (a vanished module is a failure)
- abort Focus when the recovery snapshot cannot be saved, so no module is
  deactivated without a restore point
- add a distinct ORPHANED state (installed, files gone); such modules are
  never activated and are surfaced as skips/notices
- stream the module-set YAML export before xoops_cp_header() so the
  download headers are sent and no admin markup leaks into the file
- dynamically protect the start-page module from deactivation while still
  allowing Focus to activate it when inactive

Security:
- fail closed in the bulk CSRF check when the security service is absent
- sanitize core install-log messages before rendering (strip all tags and
  escape) to stop markup injected through a module name or version
- gate the sample-data export behind the confirm + token flow like load
  and clear instead of a tokenless GET filesystem write
- add direct-access guards to the install and uninstall callbacks

QA gate:
- make composer qa pass on PHP 8.2-8.4: apply CS-Fixer and Rector, add
  xoops/xmf as a dev dependency, skip integration-only tests in unit runs,
  stub the mtools SysUtility base for analysis, and regenerate the PHPStan
  baseline
- fix the null-deref and type issues PHPStan surfaced along the way
@mambax7
mambax7 requested a review from Copilot July 25, 2026 04:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

The QA gate enables phpstan-strict-rules and phpstan-deprecation-rules
through phpstan/extension-installer, but the committed baseline had been
generated in an environment where those extensions were not active, so it
did not cover the ~145 strict/deprecation findings (mostly pre-existing
legacy patterns: empty(), short ternary, non-boolean conditions, loose
comparisons). CI therefore failed on them.

Regenerate the baseline with the strict and deprecation rule sets active
so it matches what CI analyses, and tighten the one strict finding in new
code: use an explicit false check on the query result in freshState().
@mambax7
mambax7 merged commit 7348096 into XoopsModules27x:master Jul 25, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants