fix: honest installer success for package postflight #76

Merged
jmiller merged 2 commits from fix/honest-install-success into dev 2026-07-06 16:17:49 +00:00
Owner

Summary

Applies the "honest installer success" pattern to the MokoSuiteStoreLocator package installer (source/script.php).

Joomla's package installer only logs a failed child sub-install but still runs the package postflight(), so a partial install could still show the license / next-steps message and report a false success.

Change

  • Added missingChildExtensions(InstallerAdapter $parent) — reads the package manifest via $parent->getParent()->getManifest(), iterates <files><file>, and verifies each declared child (component, modules, webservices plugin) actually landed in #__extensions (matching element + type, and folder for plugins, with plg_<group>_ prefix stripping).
  • In postflight(), the check runs before the license/next-steps message. If any child is missing, an error is enqueued (names escaped with htmlspecialchars) and the method returns before the success path.
  • Fails open: any error / unreadable manifest returns [], so a transient DB/IO glitch never turns a good install into a false failure.
  • Housekeeping (download-key restore) still runs unconditionally.

php -l passes. CHANGELOG updated under ### Fixed.

Mirrors MokoSuiteHQ PR #72 and MokoSuiteClient PR #300.

https://claude.ai/code/session_01B9aZHSWbiiZykJD88pYx8R

## Summary Applies the "honest installer success" pattern to the MokoSuiteStoreLocator **package** installer (`source/script.php`). Joomla's package installer only *logs* a failed child sub-install but still runs the package `postflight()`, so a partial install could still show the license / next-steps message and report a false success. ### Change - Added `missingChildExtensions(InstallerAdapter $parent)` — reads the package manifest via `$parent->getParent()->getManifest()`, iterates `<files><file>`, and verifies each declared child (component, modules, webservices plugin) actually landed in `#__extensions` (matching `element` + `type`, and `folder` for plugins, with `plg_<group>_` prefix stripping). - In `postflight()`, the check runs **before** the license/next-steps message. If any child is missing, an error is enqueued (names escaped with `htmlspecialchars`) and the method returns before the success path. - **Fails open**: any error / unreadable manifest returns `[]`, so a transient DB/IO glitch never turns a good install into a false failure. - Housekeeping (download-key restore) still runs unconditionally. `php -l` passes. CHANGELOG updated under `### Fixed`. Mirrors MokoSuiteHQ PR #72 and MokoSuiteClient PR #300. https://claude.ai/code/session_01B9aZHSWbiiZykJD88pYx8R
jmiller added 2 commits 2026-07-06 16:14:32 +00:00
fix: honest installer success for MokoSuiteStoreLocator package
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 11s
6b5573b12a
Package postflight now verifies every bundled child extension declared
in the manifest actually landed in #__extensions before enqueueing the
license/next-steps message. If any child is missing it enqueues an error
and returns instead of reporting a false success. Verification fails open
so a transient DB/IO glitch never turns a good install into a false
failure. Housekeeping (download-key restore) still runs unconditionally.

Claude-Session: https://claude.ai/code/session_01B9aZHSWbiiZykJD88pYx8R
chore(version): pre-release bump to 01.02.02-dev [skip ci]
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Branch Cleanup / Delete merged branch (pull_request) Failing after 1s
69fb3c0d7b
jmiller merged commit 94321fecbd into dev 2026-07-06 16:17:49 +00:00
jmiller deleted branch fix/honest-install-success 2026-07-06 16:17:49 +00:00
Sign in to join this conversation.