Index

ShipTask

MMO\admin\tasks · 1 symbol · generated 5 Oct 2026

class

ShipTask

ShipTask.php:23

Put the artifact on the target and extract it into releases/{version} -- beside the running release, never over it. Nothing the site serves changes here; that is ActivateTask's single job.

class MMO\admin\tasks\ShipTask extends MMO\admin\classes\aDeployTask
Namespace
MMO\admin\tasks
Extends
aDeployTask
Every step the old `git pull` deploy left unchecked is checked: - the transfer is verified by sha256 ON THE TARGET, so a truncated upload cannot be activated; - the archive is uploaded into a scratch folder, extracted there and deleted, then the folder is `mv`'d into place: a release folder never exists in a half-extracted state, and no tarball stays on the target -- the machine that built it has it; - shared paths are linked in before the release is eligible for activation, so the first request after the swap cannot be the thing that discovers a missing `db/` folder. Re-shipping an identical release is a no-op ([`isNeeded`](https://mcp.mmoframework.fr/documentation/mmo.admin/php/tasks/ShipTask.md#shiptask-isneeded)), which makes re-running a failed deploy cheap. Shipping a different build over the release being served is refused ([`assertNotLive`](https://mcp.mmoframework.fr/documentation/mmo.admin/php/tasks/ShipTask.md#shiptask-assertnotlive)).

Index

apply($context)
assertNotLive($context)Refuse to ship over the release current points at.
getDescription()
isNeeded($context)
plan($context)
rollback($context)Remove the release we just extracted -- it was never served, so dropping it loses nothing.
verify($context)

Methods7

assertNotLive($context)

ShipTask.php:153

Refuse to ship over the release current points at.

protected function assertNotLive(MMO\admin\helpers\Context $context): voidA release folder is named after the version, so a new build shipped without raising it lands on the live release's own folder. Replacing THAT one is what this pipeline exists not to do, and it used to: the site served a folder being deleted and re-extracted under it, [`ActivateTask`](https://mcp.mmoframework.fr/documentation/mmo.admin/php/tasks/ActivateTask.md#activatetask) then had nothing to swap -- so no health check ran -- and there was no earlier release left to roll back to. `--force` does not get past it either: re-shipping the live release is the same replacement. A live release whose folder is gone is not protected: shipping it again is what repairs the site.
$contextContext
returnsvoid
throwswhen the release folder is the one being served.

rollback($context)

ShipTask.php:163

Remove the release we just extracted -- it was never served, so dropping it loses nothing.

function rollback(MMO\admin\helpers\Context $context): void
$contextContext
returnsvoid
Inherited members (37)
ConstantsDeclared byDescription
ALERTiLogLevelAlert: Action must be taken immediately.
ALLiLogLevelMask for all
ALL_PLUSiLogLeveldebug everything
BACKTRACEiLogLevel
CRITICALiLogLevelCritical: Critical conditions.
DEBUGiLogLevelDebug: Detailed debug information.
DEEPiLogLeveldebug everything with arguments
EMERGENCYiLogLevelEmergency: System is unusable.
ERRORiLogLevelError: Runtime errors that do not require immediate action but should typically be logged and monitored.
ERROR_PLUSiLogLevelMask for all error
FATALiLogLevelMask for all fatal error
INFOiLogLevelInfo: Interesting events.
INFO_PLUSiLogLevelMask for all errors/warning/notices/info
MEMORYiLogLevelinclude backtrace object
NOTICEiLogLevelNotice: Normal but significant events.
NOTICE_PLUSiLogLevelMask for all errors/warning/notices/info
TRACEiLogLevelinclude backtrace as origins
WARNINGiLogLevelWarning: Exceptional occurrences that are not errors.
WARNING_PLUSiLogLevelMask for all errors and warnings
PropertiesDeclared byDescription
verbosityaDeployTask
MethodsDeclared byDescription
alert($message, $context)aDeployTaskAction must be taken immediately.
backtraces($message, $context)aDeployTaskForce-log a message at INFO level together with a full stack trace/memory snapshot (iLogLevel::BACKTRACE), bypassing the verbosity mask entirely (any non-zero verbosity is enough to trigger it).
critical($message, $context)aDeployTaskCritical conditions. No-op if CRITICAL is currently filtered out by the verbosity mask.
debug($message, $context)aDeployTaskDetailed debug information.
debugName()aDeployTask
emergency($message, $context)aDeployTaskSystem is unusable. No-op if EMERGENCY is currently filtered out by the verbosity mask.
error($message, $context)aDeployTaskRuntime errors that do not require immediate action but should typically be logged and monitored.
getName()aDeployTask
getVerbosity()aDeployTask
info($message, $context)aDeployTaskInteresting events. No-op if INFO is currently filtered out by the verbosity mask.
isChange()aDeployTaskWhether running this task CHANGES anything.
isRollbackCritical()aDeployTask
log($level, $message, $context)aDeployTaskLogs with an arbitrary level.
notice($message, $context)aDeployTaskNormal but significant events.
setVerbosity($verb)aDeployTaskSet the current verbosity mask, replacing whatever it was before.
testVerbosity($level)aDeployTaskTest whether a given level (or set of levels) is currently enabled by this instance's verbosity mask.
warning($message, $context)aDeployTaskExceptional occurrences that are not errors.