Store
MMO\admin\helpers · 1 symbole · générée le 27 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.
- Espace de noms
MMO\admin\helpers- Voir
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
Constantes2
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.
Propriétés9
credentials
- Type
- null | Credentials
filename
history
- Type
- null | JsonRepository
historyFilename
projectName
projects
- Type
- Collection
servers
- Type
- Collection
sshConfig
targets
- Type
- Collection
Méthodes28
assertLoaded($entity, $what)
Store.php:310Refuse an entity whose data did not survive being loaded.
assertNoSecrets($data, $path)
Store.php:444Refuse a declaration carrying anything secret-shaped, at any depth.
assertRow($row, $class, $what)
Store.php:401Refuse a record carrying a key the entity does not declare.
debugName()
Store.php:87| retourne | 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). |
| retourne | static | |
| lève | if the declaration does not exist. |
getCredentials()
Store.php:134| retourne | null | Credentials |
getDeployments()
Store.php:144| retourne | Collection | the synced deployment history. @throws eNotFound when the store carries none. |
getFilename()
Store.php:133getHistory($target, $count)
Store.php:249getHistoryFilename()
Store.php:136getHistoryRepository()
Store.php:152| retourne | null | JsonRepository |
getProject($name)
Store.php:185getProjectName()
Store.php:137getProjects()
Store.php:139| retourne | Collection |
getServer($name)
Store.php:200getServers()
Store.php:140| retourne | Collection |
getSshConfig()
Store.php:135getTargets()
Store.php:141| retourne | Collection |
hasHistory()
Store.php:151| retourne | bool |
loadProjects($data)
Store.php:263loadServers($data)
Store.php:279loadTargets($data)
Store.php:332Every target as it is written: nothing is inherited, so reading a target is reading what it is.
mirror($entries)
Store.php:224Merge a target's own journal into the local history, skipping what is already there.
| $entries | iterable | Deployment, from Journal::all. |
| retourne | int | how many entries were new. |
saveHistory()
Store.php:161Write what mirror added.
| retourne | void |
StateFilename($root)
staticStore.php:129Where a project's synced history lives on this machine: HISTORY, in the project.
stripComments($data)
Store.php:379Drop every //-prefixed key, at any depth.
suggest($key, $known)
Store.php:421__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. |