fix: honest installer success for package postflight #76
Reference in New Issue
Block a user
Delete Branch "fix/honest-install-success"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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
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(matchingelement+type, andfolderfor plugins, withplg_<group>_prefix stripping).postflight(), the check runs before the license/next-steps message. If any child is missing, an error is enqueued (names escaped withhtmlspecialchars) and the method returns before the success path.[], so a transient DB/IO glitch never turns a good install into a false failure.php -lpasses. CHANGELOG updated under### Fixed.Mirrors MokoSuiteHQ PR #72 and MokoSuiteClient PR #300.
https://claude.ai/code/session_01B9aZHSWbiiZykJD88pYx8R