fix: honest install success for package installer #16

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

Summary

The pkg_mokosuitesupport package postflight showed the "License Key Required" next-steps message even when a bundled child extension failed to install. Joomla's package installer only logs a failed sub-install but still runs postflight, so a partial install looked successful.

Change

  • Add missingChildExtensions(InstallerAdapter $adapter): reads $adapter->getParent()->getManifest()->files->file and verifies every declared child actually landed in #__extensions.
    • Component matches on element + type.
    • System plugin matches on element + type + folder, stripping the leading plg_<group>_ from the manifest id to derive the real element.
  • In postflight(), gate the license/next-steps message on it: if any child is missing, enqueue an error listing them (escaped with htmlspecialchars) and return before the license message.
  • Fails open — any error (unreadable manifest, query failure) returns [] so a transient glitch never turns a good install into a false failure. Housekeeping stays unconditional.

php -l passes. Mirrors MokoSuiteClient PR #300 / MokoSuiteHQ PR #72.

https://claude.ai/code/session_01B9aZHSWbiiZykJD88pYx8R

## Summary The `pkg_mokosuitesupport` package postflight showed the **"License Key Required"** next-steps message even when a bundled child extension failed to install. Joomla's package installer only *logs* a failed sub-install but still runs postflight, so a partial install looked successful. ## Change - Add `missingChildExtensions(InstallerAdapter $adapter)`: reads `$adapter->getParent()->getManifest()->files->file` and verifies every declared child actually landed in `#__extensions`. - Component matches on `element` + `type`. - System plugin matches on `element` + `type` + `folder`, stripping the leading `plg_<group>_` from the manifest id to derive the real element. - In `postflight()`, gate the license/next-steps message on it: if any child is missing, enqueue an **error** listing them (escaped with `htmlspecialchars`) and return before the license message. - **Fails open** — any error (unreadable manifest, query failure) returns `[]` so a transient glitch never turns a good install into a false failure. Housekeeping stays unconditional. `php -l` passes. Mirrors MokoSuiteClient PR #300 / MokoSuiteHQ PR #72. https://claude.ai/code/session_01B9aZHSWbiiZykJD88pYx8R
jmiller added 2 commits 2026-07-06 16:15:03 +00:00
fix: honest install success for MokoSuiteSupport package installer
Universal: Pre-Release / Build Pre-Release (${{ inputs.stability || github.ref_name }}) (push) Successful in 9s
471e0a7cc9
The package postflight showed the "license key required" next-steps
message even when a bundled child extension failed to install. Joomla
only logs a failed sub-install but still runs postflight.

Add missingChildExtensions(): verify every <file> declared in the
package manifest actually landed in #__extensions (plugins match on
element+type+folder with plg_<group>_ prefix stripping; component
matches element+type). Gate the license message on it and enqueue an
error listing any missing children. Fails open so a query/IO glitch
never turns a good install into a false failure.

Claude-Session: https://claude.ai/code/session_01B9aZHSWbiiZykJD88pYx8R
chore(version): pre-release bump to 01.00.34-dev [skip ci]
RC Revert / Rename rc/ back to dev/ (pull_request) Has been skipped
Branch Cleanup / Delete merged branch (pull_request) Successful in 1s
b1a023a673
jmiller merged commit c51ed89df8 into dev 2026-07-06 16:17:52 +00:00
jmiller deleted branch fix/honest-install-success 2026-07-06 16:17:52 +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/MokoSuiteSupport#16