Deployment
MMO\admin\entities · 1 symbol · generated 5 Oct 2026
Deployment
Deployment.php:20One line of a target's deployment journal (Journal), stored on the target itself in deploy/deployments.json, and mirrored into the local store by SyncTask so a control panel can read the whole fleet without connecting to it.
- Namespace
MMO\admin\entities- Extends
- Entity
- See
$commitis what makes it an answer rather than a hint: a version number says which release was meant, a commit sha says exactly which code is running.
Index
| APPLIED | ||
| FAILED | ||
| NOISE | inherited Entity properties that say nothing about a deployment. | |
| PENDING | ||
| ROLLED_BACK | ||
| artifact | the artifact's filename, so a release can be traced back to the exact tarball that produced it. | |
| backup | the database backup taken before this deployment mutated anything. | |
| checksum | sha256 of the shipped artifact, verified on the target after transfer. | |
| commit | the git commit the release was built from -- the only unambiguous answer to "what code is live?". | |
| date | iSO-8601 date. Stored explicitly (rather than relying on ctime) so the journal round-trips as plain JSON. | |
| dependencies | package name => version actually shipped in this release. | |
| duration | how long the run took, in seconds. | |
| error | the failure message, when $outcome is FAILED. | |
| host | the machine the deployment was run FROM -- which matters when only one of them has the right assets. | |
| libraries | library name => {version, commit, branch, dirty}: what each packaged library was built FROM. | |
| outcome | one of PENDING|APPLIED|FAILED|ROLLED_BACK. | |
| overlay | sha256 of the generated assets overlaid into the release (BuildTask::$include). | |
| patches | the database patches applied by this deployment (ids, MigrateTask). | |
| previous | the release that was live before this one -- what a rollback goes back to. | |
| ref | the git ref the release was built from. | |
| release | the release folder name on the target (usually the version). | |
| target | the target's name. | |
| user | whoever ran the deployment. | |
| version | the package version shipped. | |
| debugName() | ||
| getArtifact() | ||
| getBackup() | ||
| getChecksum() | ||
| getCommit() | ||
| getDate() | ||
| getDependencies() | ||
| getDirtyLibraries() | ||
| getDuration() | ||
| getError() | ||
| getHost() | ||
| getKey() | ||
| getLibraries() | ||
| getOutcome() | ||
| getOverlay() | ||
| getPatches() | ||
| getPrevious() | ||
| getRef() | ||
| getRelease() | ||
| getTarget() | ||
| getUser() | ||
| getVersion() | ||
| isApplied() | ||
| isFailed() | ||
| setOutcome($outcome, $error) | ||
| toJournal() | What gets written to the target's journal. | |
| __construct($data, $collection) |
Constants5
APPLIED
FAILED
NOISE
inherited Entity properties that say nothing about a deployment. toJournal
PENDING
ROLLED_BACK
Properties19
artifact
the artifact's filename, so a release can be traced back to the exact tarball that produced it.
backup
the database backup taken before this deployment mutated anything.
checksum
sha256 of the shipped artifact, verified on the target after transfer.
commit
the git commit the release was built from -- the only unambiguous answer to "what code is live?".
date
iSO-8601 date. Stored explicitly (rather than relying on ctime) so the journal round-trips as plain JSON.
- Type
- string
dependencies
package name => version actually shipped in this release.
- Type
- array
duration
how long the run took, in seconds.
error
the failure message, when $outcome is FAILED.
host
the machine the deployment was run FROM -- which matters when only one of them has the right assets.
libraries
library name => {version, commit, branch, dirty}: what each packaged library was built FROM.
- Type
- array
outcome
one of PENDING|APPLIED|FAILED|ROLLED_BACK.
- Type
- string
overlay
sha256 of the generated assets overlaid into the release (BuildTask::$include).
patches
the database patches applied by this deployment (ids, MigrateTask).
- Type
- array
previous
the release that was live before this one -- what a rollback goes back to.
ref
the git ref the release was built from.
release
the release folder name on the target (usually the version).
- Type
- string
target
the target's name.
- Type
- string
user
whoever ran the deployment.
- Type
- string
version
the package version shipped.
- Type
- string
Methods27
debugName()
Deployment.php:123| returns | string |
getArtifact()
Deployment.php:155getBackup()
Deployment.php:167getChecksum()
Deployment.php:157getCommit()
Deployment.php:153getDate()
Deployment.php:168| returns | string |
getDependencies()
Deployment.php:159| returns | array |
getDirtyLibraries()
Deployment.php:163| returns | array | the libraries this release was built from with uncommitted changes. |
getDuration()
Deployment.php:169getError()
Deployment.php:173getHost()
Deployment.php:171getKey()
Deployment.php:146| returns | string | what identifies this entry across machines, so a sync can merge without duplicating. |
getLibraries()
Deployment.php:160| returns | array |
getOutcome()
Deployment.php:172| returns | string |
getOverlay()
Deployment.php:158getPatches()
Deployment.php:166| returns | array |
getPrevious()
Deployment.php:156getRef()
Deployment.php:154getRelease()
Deployment.php:151| returns | string |
getTarget()
Deployment.php:150| returns | string |
getUser()
Deployment.php:170| returns | string |
getVersion()
Deployment.php:152| returns | string |
isApplied()
Deployment.php:175| returns | bool |
isFailed()
Deployment.php:176| returns | bool |
setOutcome($outcome, $error)
Deployment.php:178toJournal()
Deployment.php:136What gets written to the target's journal.
| returns | array |
__construct($data, $collection)
Deployment.php:116| $data = [] | array | |
| $collection = null | null | iCollection |
Inherited members (109)
| Constants | Declared by | Description | |
|---|---|---|---|
FLAG_CHANGED | iEntity | ||
FLAG_CREATED | iEntity | ||
FLAG_IGNORE_CHANGE | iEntity | ||
FLAG_IGNORE_ENTITY | iEntity | ||
FLAG_OPACIFY | iEntity | ||
FLAG_REMOVED | iEntity |
| Properties | Declared by | Description | |
|---|---|---|---|
ArrayProperties | aEntity | ||
changes | aEntity | ||
collection | Entity | ||
ctime | Entity | ||
errors | aEntity | ||
flags | aEntity | ||
id | Entity | identifier in collection | |
label | Entity | short name | |
links | aEntity | ||
mtime | Entity | ||
SearchProperties | aEntity | ||
status | aEntity | ||
title | Entity | long name |
| Methods | Declared by | Description | |
|---|---|---|---|
addFlags($flags) | aEntity | ||
addLink($link) | aEntity | Append a link. | |
archive() | aEntity | This function is called to 'delete' the entity. | |
ArrayProperties() | aEntity | Build (once per class, then cached in the static $ArrayProperties array) the list of every #[ArrayProperty] declared on this class, its parent classes, and the traits they use -- by reflection… | |
ArrayProperty($name) | aEntity | ||
CheckData($data, $errors) | aEntity | Check data before it touches any entity: would an entity made from $data be valid? | |
clearChanges() | aEntity | Reset change tracking: clears iEntity::FLAG_CHANGED and forgets every recorded change. | |
compareTo($value) | aEntity | Compare value | |
conversionError($key, $e) | aEntity | The error recorded for a value that could not be set at all (usually: it could not be converted to its property's type), in the same form as a validation error. | |
Copy($entity, $properties) | Entity | Build a new entity from $entity's own stored data (a duplicate, minus its id -- so saving it creates a genuinely new record -- in the same collection). | |
get($path, $default) | aEntity | Read a (possibly nested) value by json-path, e.g. | |
getArrayProperty($key, $isRef, $store) | aEntity | Read a single array property's current value, through its getter (a direct property, a path alias, or a method). | |
getChanges($asArray, $store) | aEntity | ||
getCollection() | Entity | ||
getCtime() | Entity | ||
getErrors() | aEntity | ||
getFlags() | aEntity | ||
getId() | Entity | ||
getLabel() | Entity | ||
getLinks() | aEntity | ||
getLinksByRel($rels, $all) | aEntity | Get a list of Reference that have a specific relationship. | |
getMetadata() | aEntity | ||
getMtime() | Entity | ||
getRepository() | Entity | ||
getStatus() | aEntity | ||
getTitle() | Entity | ||
getView() | aEntity | ||
hasChanged($keys) | aEntity | ||
hasFlags($flags, $strict) | aEntity | ||
hasStatusChanged() | aEntity | ||
HiddenPath($path) | aEntity | The hidden property (ArrayProperty::isHidden) a json-path goes through, known from the declared types alone: of this class, or of a class a property on the way may hold -- every class of its t… | |
ignore() | Entity | Ignore everything about this entity: discard its pending changes and flag it so it's skipped by future commits (aRepository::onCommit). | |
ignoreChanges($value) | aEntity | Temporarily suppress markChanged (used e.g. | |
isActive() | aEntity | ||
isArchive() | aEntity | ||
isArrayPropertySet($key, $store) | Entity | Same as aEntity::isArrayPropertySet, but 'ctime'/'mtime' are never reported as "set" (they're always present, so listing them adds no information), and neither is 'id' once the entity is alrea… | |
isChanged() | aEntity | ||
isCreated() | aEntity | ||
isDraft() | aEntity | ||
isEmpty() | aEntity | ||
isFinal() | aEntity | ||
isHiddenPath($path) | aEntity | ||
isIgnored() | Entity | ||
isOpacified() | aEntity | ||
isPending() | aEntity | ||
isRemoved() | aEntity | ||
isSimilar($value) | Entity | ||
isUnique() | aEntity | Tells if an entity has enough information to be unique (at least one unique group has no null) | |
isValid() | aEntity | ||
isValidated() | aEntity | ||
ListClassReferences($onlyStorable) | aEntity | Get a list of all the classes and their properties that are using references to this class. | |
loadArray($data, $coerceOptions, $fromStore) | Entity | Same as aEntity::loadArray, but 'ctime'/'mtime' are never taken from $data: they belong to the server (set when the entity is created, bumped by markChanged), and a client sending back th… | |
loadFromStore($data) | Entity | Restore from stored data, setting 'ctime'/'mtime' directly (bypassing their normal setters -- see setCtime/setMtime, which are read-only via #[ArrayProperty]). | |
localName() | Entity | ||
loopReferences() | Entity | Yield all the entities in the repository that have a reference on this one. | |
markChanged($keys) | Entity | Same as aEntity::markChanged, also bumping $mtime to now -- unless the change itself was to 'ctime'/'mtime' (avoiding infinite recursion via setMtime's own markChanged call). | |
mutate($type, $path, $value, $oldValue) | aEntity | \MMO\core\interfaces\iMutationObserver::mutate -- besides the normal tArrayProperties::mutate behavior, walks up $path to find the nearest enclosing aEntity (the mutation may have happened dee… | |
offsetExists($key) | aEntity | \ArrayAccess::offsetExists -- tells whether $key is a *declared* #[ArrayProperty], not whether it currently holds a non-default value (use isArrayPropertySet for that). | |
offsetGet($key) | aEntity | \ArrayAccess::offsetGet | |
offsetSet($key, $value) | aEntity | \ArrayAccess::offsetSet | |
offsetUnset($key) | aEntity | \ArrayAccess::offsetUnset -- equivalent to setting the property to null (its coerced value depends on the property's schema: e.g. | |
opacify($value) | aEntity | Hide this entity's properties from toArray output (typically used to redact an entity the current viewer isn't allowed to see the details of, while still letting it be referenced by uid/metadata). | |
push($path, $value) | aEntity | Append a value to a (possibly nested) list property by json-path. | |
reload() | Entity | Reload entity from its repository | |
removeFlags($flags) | aEntity | ||
removeLink($link) | aEntity | Remove a link (by identity). | |
removePermanently($force) | Entity | Remove entity from database | |
replaceBy($replace, $mergeData) | Entity | Replace this entity by another one, trying to change all references to this entity to the new one. | |
Schema() | aEntity | The JSON-Schema describing every #[ArrayProperty] of this class (built once and cached by ArrayProperties). | |
SearchProperty($name) | aEntity | ||
set($path, $value) | aEntity | Write a (possibly nested) value by json-path, creating intermediate structure as needed. | |
setArrayProperty($key, $value, $coerceOptions, $ignoreReadonly) | aEntity | Same as tArrayProperties::setArrayProperty, plus: any coercion/validation failure is caught and recorded in getErrors (making the entity isValid()-false) instead of propagating as an… | |
setArrayPropertyOffset($key, $offset, $value, $coerceOptions) | aEntity | Same as tArrayProperties::setArrayPropertyOffset, plus: when pushing (offset === null) a new entity onto a list property, if an existing item is isSimilar to the new value, that item's of… | |
setCollection($collection, $removeFromCollection) | Entity | Move this entity to (or out of, if null) a collection. | |
setCtime($date, $force) | Entity | Set creation time | |
setId($id) | Entity | Set the id, re-registering this entity in its $collection under the new id (Collection's entities are keyed by id). | |
setLinks($links) | aEntity | Replace every link with $links. | |
setMtime($date, $force) | Entity | Set modification time | |
setStatus($status) | aEntity | ||
store() | aEntity | Export all array properties with store set to true. | |
test($filter) | aEntity | ||
toArray($fields, $flatten, $recursive) | aEntity | Same as tArrayProperties::toArray, except an isOpacified entity always exports only its 'uid' and 'metadata' (its other properties are hidden from output). | |
toLink($attributes) | aEntity | ||
traitMutate($type, $path, $value, $oldValue) | aEntity | \MMO\core\interfaces\iMutationObserver::mutate -- reacts to a mutation that happened deep inside one of this object's array properties (e.g. | |
traitSetArrayProperty($key, $value, $coerceOptions, $fromStore) | aEntity | Set array property | |
traitSetArrayPropertyOffset($key, $offset, $value, $coerceOptions) | aEntity | Set/push a value into an array property | |
traitToArray($fields, $flatten, $recursive) | aEntity | Export fields to an array. | |
uid() | Entity | ||
validate($errors) | aEntity | Validate this entity: its current values against its own tArrayProperties::Schema, plus every value that could not even be set -- one that could not be converted to its property's type never r… | |
View() | aEntity |