ChecklistController
MMO\admin\controllers · 1 symbole · générée le 27 Oct 2026
ChecklistController
ChecklistController.php:57The release checklists: what to look at before a version is committed or shipped, each one a JSON file of
- Espace de noms
MMO\admin\controllers- Étend
- aDataController
- Implémente
- iRoutable
- Voir
$folder(Checklistfor the file,ChecklistBuilderfor its recipe).{MMO\admin}/pages/checklistsshows them.,$diffScope/$runScope: they hand out the code and run programs.developer/open-asopens a page's check in the session of the test account its recipe gives it (recipe.accounts,TestAccounts), as « Changer de compte » does: this machine only,$openAsScopeand the developer layer's checklists.
Index
| EVAL_DRY_RUN | ||
| NAME | a name: what its file is called, nothing that leaves the folder | |
| adminScript | ||
| anonymous | ||
| application | ||
| author | ||
| autoDone | ||
| autoDoneComment | ||
| boards | ||
| checklists | ||
| commands | ||
| decisionComment | ||
| decisionDate | ||
| default | ||
| diffScope | ||
| doneComment | ||
| folder | ||
| openAsScope | ||
| php | ||
| readOnly | ||
| readOnlyForbids | ||
| runOutput | ||
| runScope | ||
| runTimeout | ||
| scope | ||
| supervisors | ||
| testAccountsCommand | ||
| testDataCommand | ||
| verifiedLabel | ||
| accounts($list) | ||
| adminCommands() | ||
| answer($route, $list, $saving) | ||
| board($list) | ||
| box($list) | ||
| can($scope) | ||
| cdFolder($folder, $folders) | ||
| commandRefusal($command, $folders) | ||
| commandRule($command, $folders) | ||
| ConnectRoutes($routes, $config) static | ||
| decided($action, $comments) | ||
| declare($name) | Make a declared checklist when it has no file yet, and bring it up to its declaration: its title, members... | |
| DiffReader($sources) static | ||
| doneLine($item, $checklist) | ||
| edit($route, $action, $write) | Run $action on the route's checklist, locked: what it changes is written back when $write. | |
| Expected($output, $expect) static | ||
| fail($route, $status, $error) | ||
| folders($list) | ||
| getAuthor() | ||
| git($route, $read) | Read a repository of the route's checklist through ChecklistDiffController: its recipe's repositories only, for a request of this machine holding $diffScope. | |
| guard($route) | ||
| isRunnable($command, $folders) | ||
| isSupervised($list, $ticket) | ||
| LocalRefusal($server) static | Why a request may not run a command, or read the diffs: one that does not come from this machine -- its address 127.0.0.1 or ::1, through no proxy, to a local name -- or without the scope. | |
| openAsRefusal($developer, $switch) | ||
| openAsTarget($list, $item, $account, $url) | What a check opens, and as whom: its item's action (as, its url), or a profile and an address the request gives. | |
| othersFollowing($list, $name) | ||
| RepositoryKey($label) static | ||
| repositoryKeys($list) | ||
| routeBuild($route) | Rebuild the items from the recipe: what was checked stays checked while its item is still there. | |
| routeCheck($route) | Check an item, or uncheck it: a ticket all of whose items are checked gets $verifiedLabel, and loses it when one is unchecked. | |
| routeDecide($route) | Answer a decision item: post the option chosen on its ticket ($decisionComment), and check the item. | |
| routeDone($route) | Move a verified ticket to the board's first done status, and say so in its discussion with what was checked. | |
| routeGitDiff($route) | The changed files of a repository of the checklist's recipe, for <mmo-diff> (url: api/checklists/{name}/git). | |
| routeGitFile($route) | One changed file of a repository of the checklist's recipe, for <mmo-diff>. | |
| routeList($route) | ||
| routeLoad($route) | ||
| routeOpenAs($route) | Open a check's page in the session of its test account (action.as, a profile of the checklist's recipe.accounts): « Changer de compte » without the password -- the session keeps who opened it (… | |
| routeReset($route) | Start a new round: every box unchecked, a line of the history saying how far the last one got. | |
| routeRun($route) | Run an item's command (its run action): only the command the item declares, when it is on $commands, for a request of this machine holding $runScope. | |
| routeSave($route) | Create a checklist, or change it: what the body gives replaces what the checklist had (items keep their checks). | |
| ruleRefusal($rule, $command, $words) | ||
| rules() | ||
| runCommand($command, $cwd, $timeout) | ||
| runFolder($action, $folders) | ||
| runRefusal($server, $allowed) | ||
| setBuilt($list, $builder, $declaration) | Give a checklist the items $builder builds, and what its items file says besides (members, types, groups' icons, the round to start): the declaration's own win. | |
| setStatus($route, $status) | ||
| SplitCd($command) static | ||
| syncBoard($list, $name) | Give $verifiedLabel to the verified tickets, take it from the others the checklist names; with $autoDone, move to done the active ones every checklist following the board verifies through… | |
| Verdict($exitCode, $output, $action) static | Whether a run passed: it ended with 0, its output holds the action's match -- without one, its expect, as before -- and not its notMatch (unwanted: a failure, even with 0). | |
| Words($command) static |
Constantes2
EVAL_DRY_RUN
NAME
a name: what its file is called, nothing that leaves the folder
Propriétés27
adminScript
- Type
- string
anonymous
- Type
- bool
application
- Type
- string
author
autoDone
- Type
- bool
autoDoneComment
- Type
- string
boards
checklists
- Type
- array
commands
- Type
- array
decisionComment
- Type
- string
decisionDate
- Type
- string
default
diffScope
- Type
- string
doneComment
- Type
- string
folder
- Type
- string
openAsScope
- Type
- string
php
- Type
- string
readOnly
- Type
- array
readOnlyForbids
- Type
- array
runOutput
- Type
- int
runScope
- Type
- string
runTimeout
- Type
- int
scope
supervisors
testAccountsCommand
- Type
- string
testDataCommand
- Type
- string
verifiedLabel
- Type
- array
Méthodes52
accounts($list)
ChecklistController.php:529adminCommands()
ChecklistController.php:650| retourne | array | the commands $adminScript declares (#[Command([['const' => 'cpam-orphans']], ...)], #[InteractiveCommand('role', ...)]) |
answer($route, $list, $saving)
ChecklistController.php:891| $route | Route | |
| $list | Checklist | |
| $saving = 0 | int | 1 when the checklist is about to be written: the version it will have |
| retourne | array | the checklist (Checklist), with name, declared (one of $checklists), progress and, when it follows a board, tickets: each ticket its items name, its title, its status and how many of its items are checked |
board($list)
ChecklistController.php:981box($list)
ChecklistController.php:876can($scope)
ChecklistController.php:861cdFolder($folder, $folders)
ChecklistController.php:684commandRefusal($command, $folders)
ChecklistController.php:585| $command | string | what an item asks to run: a command of $commands, which a rule allowing it (cd) may run in a repository of the checklist's recipe (cd ~/dev/src/MMO/master/libs/core && phpunit) |
| $folders = null | null | array | |
| retourne | null | string | why it may not run, null when it is on $commands |
commandRule($command, $folders)
ChecklistController.php:594| $command | string | commandRefusal |
| $folders = null | null | array | |
| retourne | array | ?string, 1: ?array} why it may not run (null when it may), and the rule that lets it run |
ConnectRoutes($routes, $config)
staticChecklistController.php:190- Voir
$anonymous: every route is mmo.oauth'sanonymouswhen the configuration says so
decided($action, $comments)
ChecklistController.php:802- Voir
$decisionCommentup to{option}, posted since it was asked (asked), or naming its question or an option; null for none
declare($name)
ChecklistController.php:993Make a declared checklist when it has no file yet, and bring it up to its declaration: its title, members... and its items, built again when what they come from changed. Written only when something did.
| $name | string | one of $checklists |
| retourne | void |
DiffReader($sources)
staticChecklistController.php:842| $sources | array | |
| retourne | ChecklistDiffController | mmo.git's DiffController on them -- loaded here, as mmo.git may be loaded after mmo.admin's bootstrap |
doneLine($item, $checklist)
ChecklistController.php:976edit($route, $action, $write)
ChecklistController.php:1055Run $action on the route's checklist, locked: what it changes is written back when $write.
Expected($output, $expect)
staticChecklistController.php:724| $output | string | what a command printed |
| $expect | null | string | what it must hold: a text (any case), or a /regular expression/; null for nothing |
| retourne | bool |
fail($route, $status, $error)
ChecklistController.php:1082folders($list)
ChecklistController.php:737| $list | Checklist | |
| retourne | array | string> the folders a command may run in: the application's (''), then the recipe's repositories, by label, then its runFolders (ChecklistBuilder::RunFolders) -- folders a ▶ may cd to without being repositories whose changes the checklist lists |
getAuthor()
ChecklistController.php:1040git($route, $read)
ChecklistController.php:824Read a repository of the route's checklist through ChecklistDiffController: its recipe's repositories only, for a request of this machine holding $diffScope.
guard($route)
ChecklistController.php:1065isRunnable($command, $folders)
ChecklistController.php:697| $command | string | what an item asks to run |
| $folders = null | null | array | |
| retourne | bool | whether $command is one commandRefusal lets run |
isSupervised($list, $ticket)
ChecklistController.php:953| $list | Checklist | |
| $ticket | string | |
| retourne | bool | whether every item of $list verifying $ticket has a tick of $supervisors |
LocalRefusal($server)
staticChecklistController.php:556Why a request may not run a command, or read the diffs: one that does not come from this machine -- its address 127.0.0.1 or ::1, through no proxy, to a local name -- or without the scope.
| $server | array | the request's ($_SERVER) |
| retourne | null | string | the refusal, null when it comes from this machine |
openAsRefusal($developer, $switch)
ChecklistController.php:492| $developer | bool | whether the account logged in holds the developer layer's dev.checklists |
| $switch | bool | whether it holds $openAsScope |
| retourne | null | string | why it may not open a check as a test account, null when it may |
openAsTarget($list, $item, $account, $url)
ChecklistController.php:507What a check opens, and as whom: its item's action (as, its url), or a profile and an address the request gives.
| $list | Checklist | |
| $item | mixed | an item's id or ref |
| $account | mixed | a profile's key, without $item |
| $url | mixed | an address of the site, without $item |
| retourne | array | string | string, 1: array, 2: string}|string [key, profile, address relative to the site], or why not |
othersFollowing($list, $name)
ChecklistController.php:965RepositoryKey($label)
staticChecklistController.php:852| $label | string | a repository's label in a recipe (hub (MMO/master)) |
| retourne | string | the name git/{repository}/... gives it: what a path segment can hold (hub-MMO-master) |
repositoryKeys($list)
ChecklistController.php:867| $list | Checklist | |
| retourne | array | string> the recipe's repositories, by label: the name git/{repository}/... gives each (RepositoryKey) |
routeBuild($route)
ChecklistController.php:264Rebuild the items from the recipe: what was checked stays checked while its item is still there.
routeCheck($route)
ChecklistController.php:285Check an item, or uncheck it: a ticket all of whose items are checked gets $verifiedLabel, and loses it when one is unchecked.
routeDecide($route)
ChecklistController.php:410Answer a decision item: post the option chosen on its ticket ($decisionComment), and check the item.
routeDone($route)
ChecklistController.php:320Move a verified ticket to the board's first done status, and say so in its discussion with what was checked.
routeGitDiff($route)
ChecklistController.php:345The changed files of a repository of the checklist's recipe, for <mmo-diff> (url: api/checklists/{name}/git).
| $route | Route | from (none: HEAD), to (none: the working tree), path; as mmo.git's DiffController |
| retourne | array | as DiffController::routeDiff; 403 off this machine or without $diffScope |
routeGitFile($route)
ChecklistController.php:355One changed file of a repository of the checklist's recipe, for <mmo-diff>.
| $route | Route | as routeGitDiff, path the file |
| retourne | array | as DiffController::routeFile |
routeList($route)
ChecklistController.php:203routeLoad($route)
ChecklistController.php:223routeOpenAs($route)
ChecklistController.php:446Open a check's page in the session of its test account (action.as, a profile of the checklist's recipe.accounts): « Changer de compte » without the password -- the session keeps who opened it (its actor: the banner « connected as », the journal, login/restore back) --, for a request of this machine (LocalRefusal) whose account holds
- Voir
$openAsScopeand the developer layer'sdev.checklists. The account is a test one (test.…), the address one of the site (TestAccounts::SiteRelative): never a redirection elsewhere.
| $route | Route | checklist, and item (its id or ref: its account and its page), or account (a profile's key) and url |
| retourne | void |
routeReset($route)
ChecklistController.php:304Start a new round: every box unchecked, a line of the history saying how far the last one got.
routeRun($route)
ChecklistController.php:370Run an item's command (its run action): only the command the item declares, when it is on $commands, for a request of this machine holding $runScope. Passed -- exit code 0, and its output holds the action's expect -- the item is checked by whoever ran it (their box, with members). Its output is answered, not kept: only the run's code and duration are (runs).
routeSave($route)
ChecklistController.php:234Create a checklist, or change it: what the body gives replaces what the checklist had (items keep their checks).
ruleRefusal($rule, $command, $words)
ChecklistController.php:630rules()
ChecklistController.php:617runCommand($command, $cwd, $timeout)
ChecklistController.php:774| $command | string | a command commandRefusal lets run (its cd, runFolder, is $cwd) |
| $cwd | string | |
| $timeout = null | null | int | how long it may run, in seconds: its rule's (timeout), else $runTimeout |
| retourne | array | string, exitCode: int, output: string, duration: float, timedOut: bool} |
runFolder($action, $folders)
ChecklistController.php:756runRefusal($server, $allowed)
ChecklistController.php:573setBuilt($list, $builder, $declaration)
ChecklistController.php:1023Give a checklist the items $builder builds, and what its items file says besides (members, types, groups' icons, the round to start): the declaration's own win.
| $list | Checklist | |
| $builder | ChecklistBuilder | |
| $declaration = [] | array | as $checklists |
| retourne | void |
setStatus($route, $status)
ChecklistController.php:1087SplitCd($command)
staticChecklistController.php:662| $command | string | |
| retourne | array | ?string, 1: string} [folder, command] of cd {folder} && {command}, else [null, command] |
syncBoard($list, $name)
ChecklistController.php:928Give $verifiedLabel to the verified tickets, take it from the others the checklist names; with $autoDone, move to done the active ones every checklist following the board verifies through $supervisors' ticks.
Verdict($exitCode, $output, $action)
staticChecklistController.php:711Whether a run passed: it ended with 0, its output holds the action's match -- without one, its expect, as before -- and not its notMatch (unwanted: a failure, even with 0). Ended with 0 without its match: for a person to read, unchecked.
Words($command)
staticChecklistController.php:671| $command | string | a command, without its cd |
| retourne | array | its words, split on spaces -- but EVAL_DRY_RUN, one word |
Membres hérités (62)
| Constantes | Déclaré par | Description | |
|---|---|---|---|
ALERT | iLogLevel | Alert: Action must be taken immediately. | |
ALL | iLogLevel | Mask for all | |
ALL_PLUS | iLogLevel | debug everything | |
BACKTRACE | iLogLevel | ||
COLORS | aDataController | Named color palettes for chart/report endpoints, e.g. | |
CRITICAL | iLogLevel | Critical: Critical conditions. | |
DEBUG | iLogLevel | Debug: Detailed debug information. | |
DEEP | iLogLevel | debug everything with arguments | |
EMERGENCY | iLogLevel | Emergency: System is unusable. | |
ERROR | iLogLevel | Error: Runtime errors that do not require immediate action but should typically be logged and monitored. | |
ERROR_PLUS | iLogLevel | Mask for all error | |
FATAL | iLogLevel | Mask for all fatal error | |
INFO | iLogLevel | Info: Interesting events. | |
INFO_PLUS | iLogLevel | Mask for all errors/warning/notices/info | |
MEMORY | iLogLevel | include backtrace object | |
NOTICE | iLogLevel | Notice: Normal but significant events. | |
NOTICE_PLUS | iLogLevel | Mask for all errors/warning/notices/info | |
TRACE | iLogLevel | include backtrace as origins | |
WARNING | iLogLevel | Warning: Exceptional occurrences that are not errors. | |
WARNING_PLUS | iLogLevel | Mask for all errors and warnings |
| Propriétés | Déclaré par | Description | |
|---|---|---|---|
repositories | aDataController | ||
verbosity | aModule |
| Méthodes | Déclaré par | Description | |
|---|---|---|---|
alert($message, $context) | aModule | Action must be taken immediately. | |
backtraces($message, $context) | aModule | Force-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). | |
Configure($config) | aModule | Merge $config into this module's configuration in the shared Configuration. | |
critical($message, $context) | aModule | Critical conditions. No-op if CRITICAL is currently filtered out by the verbosity mask. | |
debug($message, $context) | aModule | Detailed debug information. | |
debugName() | aModule | Human-readable identifier used as the default {origin} in this instance's log messages. | |
DefaultConfig() | aModule | The config a module starts from before anything loaded via Configuration is merged in. | |
emergency($message, $context) | aModule | System is unusable. No-op if EMERGENCY is currently filtered out by the verbosity mask. | |
error($message, $context) | aModule | Runtime errors that do not require immediate action but should typically be logged and monitored. | |
ExtractRoutes($config) | aController | Extract all the APIRoute from this class, regardless of the fact they are registered in the application | |
getMainRepository() | aDataController | ||
getRepositories() | aDataController | ||
getRepository($repo) | aDataController | ||
getVerbosity() | aModule | ||
HasRoutes() | aController | Tells if any APIRoute are registered in the application | |
info($message, $context) | aModule | Interesting events. No-op if INFO is currently filtered out by the verbosity mask. | |
Instantiate($config) | aModule | (Re)create the shared instance immediately, configured with $config merged into the class's existing config. | |
IsShared() | aModule | ||
Link($method, $data) | aController | Build a Link (URL + label/icon/description/title, taken from the route's APIRoute metadata) for a registered route. | |
log($level, $message, $context) | aModule | Logs with an arbitrary level. | |
notice($message, $context) | aModule | Normal but significant events. | |
offsetExists($key) | aModule | \ArrayAccess::offsetExists -- tells whether $key is a declared property at all, regardless of whether it is currently readable/writable through array access. | |
offsetGet($key) | aModule | \ArrayAccess::offsetGet -- reads a property directly, unless it has a #[Serialize(serialize: 'methodName')] attribute, in which case that zero-argument method is called instead (e.g. | |
offsetSet($key, $value) | aModule | \ArrayAccess::offsetSet -- sets a property directly, unless it has a #[Serialize(unserialize: 'methodName')] attribute, in which case that method is called with $value instead (e.g. | |
offsetUnset($key) | aModule | \ArrayAccess::offsetUnset -- equivalent to $module[$key] = null. | |
onRoute($route) | aDataController | Same as aController::onRoute, plus forcing the response to JSON (Response::Json) for every route this controller claims. | |
Route($method) | aController | Get a registered APIRoute WARNING: if this class was not registered in the application, it will return null. | |
Routes() | aController | Get a list of registered APIRoutes (from this class) in the application WARNING: if this class was not registered in the application, it will return an empty array. | |
serialize($path, $serializer) | aModule | \MMO\core\interfaces\iSerializable::serialize -- exports every property (via | |
setRepositories($repositories) | aDataController | Register the repositories this controller can query, keyed by name (e.g. | |
setVerbosity($verb) | aModule | Set the current verbosity mask, replacing whatever it was before. | |
Shared() | aModule | Get the shared instance, creating (and configuring) it on first call. | |
testVerbosity($level) | aModule | Test whether a given level (or set of levels) is currently enabled by this instance's verbosity mask. | |
traitUnshare($serialize) | aModule | Remove the shared instance, so the next Shared() call creates a fresh one. | |
unserialize($data, $path, $instances) | aModule | \MMO\core\interfaces\iSerializable::unserialize -- merges $data onto DefaultConfig, runs it through the (possibly overridden) constructor, then applies each resulting value to its property (via | |
Unshare($serialize) | aModule | Like tSingleton::Unshare, but also disconnects this module's instance from every event it was listening to (via Event::DisconnectListeners) before dropping it. | |
Url($method, $data) | aController | Build the URL for a registered route, filling in any {placeholder} from $data. | |
warning($message, $context) | aModule | Exceptional occurrences that are not errors. | |
__construct($config) | aModule | protected constructor, so it is not possible to do new Module(...) called by the serialization process just before being injected with data. | |
__wakeup() | aController | Called automatically right after the controller's shared instance is built (aModule::unserialize): registers onRoute as a Route listener with a low priority (-10), so it… |