Store
MMO\admin\helpers · 1 symbol · generated 5 Oct 2026
Store
Store.php:35Everything the deployment tooling knows, as entities: which projects exist, which machines they run on, which targets live on those machines, and what has actually been deployed to each.
- Namespace
MMO\admin\helpers- See
Targetcollections. The store NEVER writes this file, and no deployment does. A deployment topology is reviewed source, not application state, and a tool that can rewrite it is a tool that can quietly change where a release goes.SetupWizardedits it -- only once a person has answered and read the diff. 2. The history -- aJsonRepositoryat.mmo/deploy.history.jsonin the project (HISTORY), filled bysync-- and after every deployment -- from each target's own journal. This one is ordinary, writable state, and it is what the dashboard reads for a fleet-wide view without connecting to 27 machines to draw a page. It is this machine's record, not the project's: git-ignored, and readable by you alone.,Credentials, and every ssh alias throughSshConfig, from files beside the declaration git ignores.deploy.jsonis checked for secret-shaped keys on load (assertNoSecrets) and refuses to parse if it has any, so the previous pipeline's failure -- a production password committed to 31 branches -- cannot be repeated by someone taking the obvious shortcut.
Index
Constants2
HISTORY
where a project keeps this machine's deployment history, relative to the folder of deploy.json.
SECRETS
keys that must never appear in the committed declaration, whatever level they appear at.
Properties9
credentials
- Type
- null | Credentials
filename
history
- Type
- null | JsonRepository
historyFilename
projectName
projects
- Type
- Collection
servers
- Type
- Collection
sshConfig
targets
- Type
- Collection
Methods28
assertLoaded($entity, $what)
Store.php:305Refuse an entity whose data did not survive being loaded.
assertNoSecrets($data, $path)
Store.php:439Refuse a declaration carrying anything secret-shaped, at any depth.
assertRow($row, $class, $what)
Store.php:396Refuse a record carrying a key the entity does not declare.
debugName()
Store.php:87| returns | string |
FromFile($filename, $credentialsFilename, $history, $sshConfigFilename)
staticStore.php:99| $filename | string | the declaration, resolved through filename. |
| $credentialsFilename = null | null | string | null: deploy.credentials.json beside the declaration (Credentials::DefaultFilename). |
| $history = true | bool | load/persist the synced deployment history as well. |
| $sshConfigFilename = null | null | string | null: deploy.ssh.config beside the declaration (SshConfig::DefaultFilename). |
| returns | static | |
| throws | if the declaration does not exist. |
getCredentials()
Store.php:129| returns | null | Credentials |
getDeployments()
Store.php:139| returns | Collection | the synced deployment history. @throws eNotFound when the store carries none. |
getFilename()
Store.php:128getHistory($target, $count)
Store.php:244getHistoryFilename()
Store.php:131getHistoryRepository()
Store.php:147| returns | null | JsonRepository |
getProject($name)
Store.php:180getProjectName()
Store.php:132getProjects()
Store.php:134| returns | Collection |
getServer($name)
Store.php:195getServers()
Store.php:135| returns | Collection |
getSshConfig()
Store.php:130getTargets()
Store.php:136| returns | Collection |
hasHistory()
Store.php:146| returns | bool |
loadProjects($data)
Store.php:258loadServers($data)
Store.php:274loadTargets($data)
Store.php:327Every target as it is written: nothing is inherited, so reading a target is reading what it is.
mirror($entries)
Store.php:219Merge a target's own journal into the local history, skipping what is already there.
| $entries | iterable | Deployment, from Journal::all. |
| returns | int | how many entries were new. |
saveHistory()
Store.php:156Write what mirror added.
| returns | void |
StateFilename($root)
staticStore.php:124Where a project's synced history lives on this machine: HISTORY, in the project.
stripComments($data)
Store.php:374Drop every //-prefixed key, at any depth.
suggest($key, $known)
Store.php:416__construct($data, $filename, $credentials, $stateFilename, $sshConfig)
Store.php:66| $data = [] | array | the decoded declaration ({project, projects, servers, targets}). |
| $filename = null | null | string | for error messages only. |
| $credentials = null | null | Credentials | resolved secrets, injected into every server. |
| $stateFilename = null | null | string | where the synced history lives (null: no history). |
| $sshConfig = null | null | SshConfig | the project's ssh aliases, injected into every server. |