fix: honest installer success message #40

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

Summary

Applies the "honest installer success" pattern (mirrors MokoSuiteHQ #72 / MokoSuiteClient #300) to the pkg_mokosuitenpo package installer.

Joomla's package installer only logs a failed child sub-install but still runs the parent postflight, so the installer could show the "Moko Consulting License Key Required" / next-steps success message even when a bundled extension failed to install.

Changes

  • source/script.php postflight now calls a new private missingChildExtensions(InstallerAdapter $adapter) that reads the package manifest via $adapter->getParent()->getManifest(), iterates files->file, derives each child's element/type(/folder for plugins — stripping a leading plg_<group>_ from the id), and verifies a matching #__extensions row exists.
  • If any child is missing, an honest error is enqueued (names htmlspecialchars-escaped) and postflight returns before the warnMissingLicenseKey() license/success message.
  • Fails open: the whole check is wrapped in try/catch; any error / unreadable manifest is treated as "nothing missing" so a transient DB/IO glitch never fakes a failure.

php -l passes.

https://claude.ai/code/session_01B9aZHSWbiiZykJD88pYx8R

## Summary Applies the "honest installer success" pattern (mirrors MokoSuiteHQ #72 / MokoSuiteClient #300) to the `pkg_mokosuitenpo` package installer. Joomla's package installer only *logs* a failed child sub-install but still runs the parent `postflight`, so the installer could show the "Moko Consulting License Key Required" / next-steps success message even when a bundled extension failed to install. ## Changes - `source/script.php` `postflight` now calls a new private `missingChildExtensions(InstallerAdapter $adapter)` that reads the package manifest via `$adapter->getParent()->getManifest()`, iterates `files->file`, derives each child's `element`/`type`(/`folder` for plugins — stripping a leading `plg_<group>_` from the id), and verifies a matching `#__extensions` row exists. - If any child is missing, an honest **error** is enqueued (names `htmlspecialchars`-escaped) and `postflight` **returns before** the `warnMissingLicenseKey()` license/success message. - **Fails open**: the whole check is wrapped in try/catch; any error / unreadable manifest is treated as "nothing missing" so a transient DB/IO glitch never fakes a failure. `php -l` passes. https://claude.ai/code/session_01B9aZHSWbiiZykJD88pYx8R
jmiller added 2 commits 2026-07-06 16:21:43 +00:00
fix: honest installer success message
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 11s
445394d4ae
Gate the installer's license / next-steps success message behind a
verification that every child extension declared in the package manifest
actually landed in #__extensions. If any bundled extension is missing,
show an honest error instead of the success/license message and return.

Fails open: any error (unreadable manifest, query failure) is treated as
"nothing missing" so a transient glitch never fakes a failure. Housekeeping
(dlid restore, plugin enable) still runs unconditionally.

Claude-Session: https://claude.ai/code/session_01B9aZHSWbiiZykJD88pYx8R
chore(version): pre-release bump to 01.07.30-dev [skip ci]
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Branch Cleanup / Delete merged branch (pull_request) Successful in 2s
38eddc2852
jmiller added 1 commit 2026-07-06 16:21:43 +00:00
chore(version): pre-release bump to 01.07.30-dev [skip ci]
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Branch Cleanup / Delete merged branch (pull_request) Successful in 2s
38eddc2852
jmiller merged commit 90f3f11c3c into dev 2026-07-06 16:22:45 +00:00
jmiller deleted branch fix/honest-install-success 2026-07-06 16:22:45 +00:00
Sign in to join this conversation.
No Reviewers
Priority -
Type -
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: MokoConsulting/MokoSuiteNPO#40