feat: BackupRunner helper — unify backup run/status/notification #214
Reference in New Issue
Block a user
Delete Branch "feat/backup-runner-helper"
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?
Why
Every non-interactive backup trigger used a slightly different path, so final status and notification gating behaved inconsistently depending on what started the backup. This is the root cause of the "pre-update backup notification gating not working" report:
runPreActionBackup()runs its ownBackupEnginecall, separate from the dashboard's "Backup Now" (stepped/AJAX) flow, with no shared seam for status/notification behavior.What
Adds
com_mokosuitebackup/src/Service/BackupRunner.php— the single synchronous entry point for a backup.BackupEngine, which already sends notifications gated by the profile'snotify_on_success/notify_on_failureand applies retention. BackupRunner does not re-notify (no double-send).{success, status, message, record_id, warnings}— including the real complete / warning / fail status the engine writes to the record but never returned, so callers can finally distinguish a warning (archive made, remote upload failed) from a clean success.BackupEngine, so each caller requires just one file.Routed through BackupRunner (previously each did
new BackupEngine()directly):plg_systemrunPreActionBackup()preactionplg_systemweb-cron handlerwebcronplg_contenttriggerAutoBackup()backend(pre-install)plg_taskscheduled runscheduledplg_consoleRunCommandcliDeferred / not in scope
SteppedBackupEngine+ progress modal) is unchanged — it's the interactive equivalent.// TODO(#196)marks the seam inBackupRunner::run().Verification
php -lclean on all changed files.plg_task's separateSnapshotEngineguard is intentionally left untouched.https://claude.ai/code/session_01WbGBN9VyRK61zczYWcCQ2i
Wiki reminder: docs are wiki-first -- if this PR changes behavior, usage, config, or standards, please update the repo wiki before/after merge. (non-blocking)
1bc01c08bcto28ca110d7b