Apply standard licensing + install-completion installer script pattern #202

Merged
jmiller merged 1 commits from chore/installer-script-template into main 2026-07-04 20:27:27 +00:00
Owner

Summary

Applies the Template-Joomla/samples/script/script_package.php pattern to source/script.php for download-key handling and install completion, while preserving every MokoSuiteBackup-specific postflight step (plugin enable, webcron secret, default scheduled task, submenu items, client_id fix, icon sync, backup_dir migration, review-settings notice).

Licensing / key handling

  • preflight (update) → backupDownloadKey() caches the bare dlid value from the update site.
  • postflight (update) → restoreDownloadKey() re-writes extra_query as dlid=<key> on the (possibly re-registered) update site.
  • Placeholders resolved: {REPONAME}MokoSuiteBackup, {PACKAGENAME}pkg_mokosuitebackup.
  • Licensing methods now log via Joomla\CMS\Log\Log instead of error_log.

Install completion

  • installSuccessful() info notice shows on install and update.
  • warnMissingLicenseKey() prompt shows on install only — a fresh install never carries a key, so the previous always-run "is a key already present?" guard is removed.

Notes

  • preflight_saveKey() was renamed to backupDownloadKey() (now private) per the template.
  • Independent branch off main; does not overlap the branding (#200) or manifest (#201) PRs.

Test plan

  • Fresh install → "installed successfully" + "License Key Required" notices; default profile created.
  • Enter a DLID, then update → key preserved (no re-entry needed), "installed successfully" shows, no license nag.
  • php -l passes (verified locally).
## Summary Applies the `Template-Joomla/samples/script/script_package.php` pattern to `source/script.php` for **download-key handling** and **install completion**, while preserving every MokoSuiteBackup-specific postflight step (plugin enable, webcron secret, default scheduled task, submenu items, `client_id` fix, icon sync, `backup_dir` migration, review-settings notice). ### Licensing / key handling - `preflight` (update) → `backupDownloadKey()` caches the bare `dlid` value from the update site. - `postflight` (update) → `restoreDownloadKey()` re-writes `extra_query` as `dlid=<key>` on the (possibly re-registered) update site. - Placeholders resolved: `{REPONAME}`→`MokoSuiteBackup`, `{PACKAGENAME}`→`pkg_mokosuitebackup`. - Licensing methods now log via `Joomla\CMS\Log\Log` instead of `error_log`. ### Install completion - `installSuccessful()` info notice shows on **install and update**. - `warnMissingLicenseKey()` prompt shows on **install only** — a fresh install never carries a key, so the previous always-run "is a key already present?" guard is removed. ## Notes - `preflight_saveKey()` was renamed to `backupDownloadKey()` (now private) per the template. - Independent branch off `main`; does not overlap the branding (#200) or manifest (#201) PRs. ## Test plan - [ ] Fresh install → "installed successfully" + "License Key Required" notices; default profile created. - [ ] Enter a DLID, then update → key preserved (no re-entry needed), "installed successfully" shows, no license nag. - [ ] `php -l` passes (verified locally).
jmiller added 1 commit 2026-07-04 20:27:15 +00:00
fix(installer): apply standard licensing + install-completion script pattern
Universal: PR Check / Branch Policy (pull_request) Successful in 2s
Joomla: Extension CI / Release Readiness Check (pull_request) Failing after 6s
Universal: PR Check / Secret Scan (pull_request) Successful in 7s
Joomla: Metadata Validation / Validate Joomla Metadata (pull_request) Successful in 11s
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Failing after 6s
Generic: Repo Health / Access control (pull_request) Successful in 1s
Generic: Repo Health / Site Health (pull_request) Has been skipped
Universal: Build & Release / Promote to RC (pull_request) Has been skipped
Branch Cleanup / Delete merged branch (pull_request) Successful in 2s
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Generic: Project CI / Lint & Validate (pull_request) Successful in 45s
Universal: PR Check / Validate PR (pull_request) Failing after 40s
Joomla: Extension CI / Lint & Validate (pull_request) Failing after 49s
Universal: Build & Release / Build & Release Pipeline (pull_request) Successful in 31s
Universal: Workflow Sync Trigger / Sync workflows to live repos (pull_request) Successful in 3m0s
Generic: Project CI / Tests (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.2) (pull_request) Has been cancelled
Joomla: Extension CI / Tests (PHP 8.3) (pull_request) Has been cancelled
Joomla: Extension CI / PHPStan Analysis (pull_request) Has been cancelled
Joomla: Extension CI / Build RC Pre-Release (pull_request) Has been cancelled
Universal: PR Check / Build RC Package (pull_request) Has been cancelled
Universal: PR Check / Report Issues (pull_request) Has been cancelled
Generic: Repo Health / Scripts governance (pull_request) Has been cancelled
Generic: Repo Health / Repository health (pull_request) Has been cancelled
Generic: Repo Health / Report: Scripts Governance (pull_request) Has been cancelled
Generic: Repo Health / Report: Repository Health (pull_request) Has been cancelled
1758694893
Adopts the Template-Joomla package-script pattern for download-key handling
and post-install messaging, while preserving all MokoSuiteBackup-specific
postflight steps (plugins, webcron secret, scheduled task, submenus,
client_id fix, icon sync, backup_dir migration).

- preflight (update): backupDownloadKey() caches the bare dlid value
- postflight (update): restoreDownloadKey() re-writes extra_query as dlid=<key>
- postflight (install): installSuccessful() + warnMissingLicenseKey()
- postflight (update): installSuccessful()
- License nag now runs on install only (a fresh install never has a key),
  removing the previous always-run "is a key present?" guard
- Licensing methods log via Joomla\CMS\Log\Log instead of error_log
jmiller force-pushed chore/installer-script-template from 3ec56906a3 to 1758694893 2026-07-04 20:27:15 +00:00 Compare
jmiller merged commit 23fa4884bd into main 2026-07-04 20:27:27 +00:00
jmiller deleted branch chore/installer-script-template 2026-07-04 20:27:29 +00:00
Sign in to join this conversation.