MMOframework
Pourquoi l'IA Playground Bibliothèques Documentation Rechercher Agence
FR EN
Index

ChecklistController

MMO\admin\controllers · 1 symbole · générée le 27 Oct 2026

class

ChecklistController

ChecklistController.php:57

The release checklists: what to look at before a version is committed or shipped, each one a JSON file of

class MMO\admin\controllers\ChecklistController extends MMO\core\classes\aDataController implements MMO\core\interfaces\iRoutable
Espace de noms
MMO\admin\controllers
Étend
aDataController
Implémente
iRoutable
Voir
$folder (Checklist for the file, ChecklistBuilder for its recipe). {MMO\admin}/pages/checklists shows them., $diffScope / $runScope: they hand out the code and run programs. developer/open-as opens 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, $openAsScope and the developer layer's checklists.
A checklist may follow a `<mmo-kanban>` board of [`$boards`](https://mmoframework.fr/fr/documentation/mmo.admin/php/controllers/ChecklistController.md#checklistcontroller-boards) (`board`): its items then name the tickets they verify. Checking the last item of a ticket gives it [`$verifiedLabel`](https://mmoframework.fr/fr/documentation/mmo.admin/php/controllers/ChecklistController.md#checklistcontroller-verifiedlabel) on the board, unchecking one takes it away; a verified ticket can be moved to the board's first done status, with a comment in its discussion listing what was checked. With [`$autoDone`](https://mmoframework.fr/fr/documentation/mmo.admin/php/controllers/ChecklistController.md#checklistcontroller-autodone), it moves there by itself once every checklist following the board and naming it has all its items checked. `build.json` rebuilds the items from the recipe -- the repositories' `git status`, the tickets' result comments and ```` ```check ```` blocks: run it again after a change, what was checked stays checked while its item is still there. A checklist of [`$checklists`](https://mmoframework.fr/fr/documentation/mmo.admin/php/controllers/ChecklistController.md#checklistcontroller-checklists) is declared by the application: made the first time it is asked for, and built again from its recipe whenever its items file changes (a new version of the application asks other checks) -- what was checked stays checked while its item is there. One may be the page's [`$default`](https://mmoframework.fr/fr/documentation/mmo.admin/php/controllers/ChecklistController.md#checklistcontroller-default). `reset.json` starts a new round (a release to check): every box unchecked, a line of its history saying how far the last one got. The items file starts one too, by asking for a `round` the checklist is not at; and a check whose `recheck` changed is unchecked alone ([`ChecklistBuilder`](https://mmoframework.fr/fr/documentation/mmo.admin/php/helpers/ChecklistBuilder.md#checklistbuilder)): the release bringing the file does it, the first time the checklist is asked for. Declared like any controller, with where the files are: "MMO\\admin\\controllers\\ChecklistController": {"folder": "{root}/checklists", "boards": "{root}/boards", "scope": "admin", "checklists": {"general": {"title": "Release checklist", "recipe": {"itemsFile": "{root}/src/checklists/general.json"}}}, "default": "general"} > WARNING: whoever reaches these routes writes the checklists and the boards they follow. Give a [`$scope`](https://mmoframework.fr/fr/documentation/mmo.admin/php/controllers/ChecklistController.md#checklistcontroller-scope) on any > application served beyond localhost; [`$anonymous`](https://mmoframework.fr/fr/documentation/mmo.admin/php/controllers/ChecklistController.md#checklistcontroller-anonymous) opens them to whoever calls, logged in or not (mmo.oauth): only > on a development machine, for the agents' `curl`. An item may be checked in one click (its `action`, [`Checklist::NormalizeAction`](https://mmoframework.fr/fr/documentation/mmo.admin/php/helpers/Checklist.md#checklist-normalizeaction)): `git/{repository}/diff.json` and `diff/file.json` serve `<mmo-diff>` the recipe's repositories ([`ChecklistDiffController`](https://mmoframework.fr/fr/documentation/mmo.admin/php/controllers/ChecklistDiffController.md#checklistdiffcontroller)), `run.json` runs an item's command when it is on [`$commands`](https://mmoframework.fr/fr/documentation/mmo.admin/php/controllers/ChecklistController.md#checklistcontroller-commands) and checks the item when it passes, `decide.json` posts a decision on the item's ticket. The diffs and the commands answer only a request of this machine ([`LocalRefusal`](https://mmoframework.fr/fr/documentation/mmo.admin/php/controllers/ChecklistController.md#checklistcontroller-localrefusal)) holding
curl http://localhost/my.oviepro/api/checklists.json curl -X POST http://localhost/my.oviepro/api/checklists/my.oviepro-4.1/build.json curl -X POST -H 'Content-Type: application/json' -d '{"name": "4.2"}' http://localhost/my.oviepro/api/checklists/general/reset.json curl -X PUT -H 'Content-Type: application/json' -d '{"checked": true}' http://localhost/my.oviepro/api/checklists/my.oviepro-4.1/items/3d332c914651.json curl -X PUT -H 'Content-Type: application/json' -d '{"checked": true}' http://localhost/my.oviepro/api/checklists/my.oviepro-4.2.1/items/R421-12.json

Index

EVAL_DRY_RUN
NAMEa 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) staticWhy 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) staticWhether 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

const EVAL_DRY_RUN = '\'var DRY_RUN = true\''

NAME

a name: what its file is called, nothing that leaves the folder

const NAME = '/^[a-z0-9][a-z0-9._-]{0,99}$/i'

Propriétés27

adminScript

string $adminScript = '{root}/admin.php'
Type
string

anonymous

bool $anonymous = false
Type
bool

application

string $application = '{root}'
Type
string

autoDone

bool $autoDone = true
Type
bool

autoDoneComment

string $autoDoneComment = '**Checklists**: every item checked, moved to **done** automatically.'
Type
string

boards

?string $boards = '{root}/boards'
Type
null | string

checklists

array $checklists = []
Type
array

commands

array $commands = […8 items]
Type
array

decisionComment

string $decisionComment = '**Decision of {by} ({date})**: {option} > {question}'
Type
string

decisionDate

string $decisionDate = 'd/m/Y'
Type
string

diffScope

string $diffScope = 'dev.checklists'
Type
string

doneComment

string $doneComment = '**Release checklist**: verified, moved to **done**.'
Type
string

folder

string $folder = '{root}/checklists'
Type
string

openAsScope

string $openAsScope = 'sudo.switchAccount'
Type
string

php

string $php = 'php'
Type
string

readOnly

array $readOnly = []
Type
array

readOnlyForbids

array $readOnlyForbids = ['--fix']
Type
array

runOutput

int $runOutput = 200000
Type
int

runScope

string $runScope = 'dev.checklists#run'
Type
string

runTimeout

int $runTimeout = 600
Type
int

supervisors

?array $supervisors = null
Type
null | array

testAccountsCommand

string $testAccountsCommand = 'php admin.php developer test-accounts --checklist={name}'
Type
string

testDataCommand

string $testDataCommand = 'php admin.php developer test-data --checklist={name}'
Type
string

verifiedLabel

array $verifiedLabel = […4 items]
Type
array

Méthodes52

accounts($list)

ChecklistController.php:529
protected function accounts(MMO\admin\helpers\Checklist $list): array
$listChecklist
retournearrayarray{username: string, label: string, description: string, self: bool, exists: ?bool}> the checklist's test accounts, by profile: whether this database has each (null: no mmo.oauth to say, or the account logged in) -- for the page's buttons

answer($route, $list, $saving)

ChecklistController.php:891
protected function answer( MMO\core\server\Route $route, MMO\admin\helpers\Checklist $list, int $saving = 0 ): array
$routeRoute
$listChecklist
$saving = 0int1 when the checklist is about to be written: the version it will have
retournearraythe 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

box($list)

ChecklistController.php:876
protected function box(MMO\admin\helpers\Checklist $list): ?string
$listChecklist
retournenull | stringthe box whoever asks checks: theirs on a checklist with members (null when they are not one), else the only one

can($scope)

ChecklistController.php:861
function can(string $scope): bool
$scopestring
retourneboolwhether whoever asks holds $scope: mmo.oauth's, else the developer mode's (all of them on an open development machine)

cdFolder($folder, $folders)

ChecklistController.php:684
protected function cdFolder(string $folder, ?array $folders): ?string
$folderstringa cd's folder (~/dev/src/MMO/master/libs/core)
$foldersnull | array
retournenull | stringits path when it is a repository of the recipe (not the application's own folder, unless the recipe names it), null else

commandRefusal($command, $folders)

ChecklistController.php:585
function commandRefusal(string $command, ?array $folders = null): ?string
$commandstringwhat 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 = nullnull | array
retournenull | stringwhy it may not run, null when it is on $commands
ChecklistController::Shared()->commandRefusal('php admin.php cpam-reattach'); // 'only its dry run...'

decided($action, $comments)

ChecklistController.php:802
function decided(array $action, array $comments): ?array
Voir
$decisionComment up to {option}, posted since it was asked (asked), or naming its question or an option; null for none
$actionarraya decision action
$commentsarrayits ticket's discussion
retournenull | arraystring, option: string}|null the decision posted on it that answers it: a comment that reads as

declare($name)

ChecklistController.php:993

Make 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.

function declare(string $name): void
$namestringone of $checklists
retournevoid

DiffReader($sources)

staticChecklistController.php:842
static function DiffReader(array $sources): MMO\admin\controllers\ChecklistDiffController
$sourcesarray
retourneChecklistDiffControllermmo.git's DiffController on them -- loaded here, as mmo.git may be loaded after mmo.admin's bootstrap

doneLine($item, $checklist)

ChecklistController.php:976
protected function doneLine(array $item, string $checklist): string
$itemarray
$checkliststring
retournestringan item in a done comment: - [x] ref title (checklist — group — section)

edit($route, $action, $write)

ChecklistController.php:1055

Run $action on the route's checklist, locked: what it changes is written back when $write.

protected function edit(MMO\core\server\Route $route, callable $action, bool $write = false): array
$routeRoute
$actioncallable
$write = falsebool
retournearraywhat $action answers

Expected($output, $expect)

staticChecklistController.php:724
static function Expected(string $output, ?string $expect): bool
$outputstringwhat a command printed
$expectnull | stringwhat it must hold: a text (any case), or a /regular expression/; null for nothing
retournebool
ChecklistController::Expected("ok.\n", 'OK'); // true

folders($list)

ChecklistController.php:737
protected function folders(MMO\admin\helpers\Checklist $list): array
$listChecklist
retournearraystring> 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

LocalRefusal($server)

staticChecklistController.php:556

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.

static function LocalRefusal(array $server): ?string
$serverarraythe request's ($_SERVER)
retournenull | stringthe refusal, null when it comes from this machine
ChecklistController::LocalRefusal(['REMOTE_ADDR' => '127.0.0.1', 'HTTP_HOST' => 'localhost']); // null

openAsRefusal($developer, $switch)

ChecklistController.php:492
function openAsRefusal(bool $developer, bool $switch): ?string
$developerboolwhether the account logged in holds the developer layer's dev.checklists
$switchboolwhether it holds $openAsScope
retournenull | stringwhy it may not open a check as a test account, null when it may

openAsTarget($list, $item, $account, $url)

ChecklistController.php:507

What a check opens, and as whom: its item's action (as, its url), or a profile and an address the request gives.

function openAsTarget( MMO\admin\helpers\Checklist $list, mixed $item, mixed $account, mixed $url ): array|string
$listChecklist
$itemmixedan item's id or ref
$accountmixeda profile's key, without $item
$urlmixedan address of the site, without $item
retournearray | stringstring, 1: array, 2: string}|string [key, profile, address relative to the site], or why not
$controller->openAsTarget($list, 'R501-999', null, null); // ['limited', ['username' => 'test.groupe.nord', ...], 'gestion/sousTraitants']

RepositoryKey($label)

staticChecklistController.php:852
static function RepositoryKey(string $label): string
$labelstringa repository's label in a recipe (hub (MMO/master))
retournestringthe name git/{repository}/... gives it: what a path segment can hold (hub-MMO-master)
ChecklistController::RepositoryKey('hub (MMO/master)'); // 'hub-MMO-master'

routeBuild($route)

ChecklistController.php:264

Rebuild the items from the recipe: what was checked stays checked while its item is still there.

#[MMO\core\attributes\APIRoute('POST|api/checklists/{name}/build.json', 'Rebuild a release checklist\'s items from its recipe', mediaTypes: ['json'])] function routeBuild(MMO\core\server\Route $route): array
$routeRoute
retournearrayas routeLoad, and build: {orphans, unmatched, unmatchedAccounts}: the files no ticket cites, the treated tickets no file names, the checks speaking of an account no profile of recipe.accounts knows ({ref, id, title, text, as})

routeCheck($route)

ChecklistController.php:285

Check an item, or uncheck it: a ticket all of whose items are checked gets $verifiedLabel, and loses it when one is unchecked.

#[MMO\core\attributes\APIRoute('PUT|api/checklists/{name}/items/{item}.json', 'Check an item of a release checklist, by its id or its ref: {checked, member}', mediaTypes: ['json'])] function routeCheck(MMO\core\server\Route $route): array
$routeRoutea JSON body {checked, member}: member only when the checklist has members
retournearrayas routeLoad

routeDecide($route)

ChecklistController.php:410

Answer a decision item: post the option chosen on its ticket ($decisionComment), and check the item.

#[MMO\core\attributes\APIRoute('POST|api/checklists/{name}/items/{item}/decide.json', 'Answer a decision item of a release checklist, on its ticket: {option}', mediaTypes: ['json'])] function routeDecide(MMO\core\server\Route $route): array
$routeRoutea JSON body {option}: one of the action's options
retournearrayas routeLoad; 409 when it was decided already, or the board has no such ticket

routeDone($route)

ChecklistController.php:320

Move a verified ticket to the board's first done status, and say so in its discussion with what was checked.

#[MMO\core\attributes\APIRoute('POST|api/checklists/{name}/tickets/{ticket}/done.json', 'Move a release checklist\'s verified ticket to done', mediaTypes: ['json'])] function routeDone(MMO\core\server\Route $route): array
$routeRoute
retournearrayas routeLoad; 409 when the ticket is not verified

routeGitDiff($route)

ChecklistController.php:345

The changed files of a repository of the checklist's recipe, for <mmo-diff> (url: api/checklists/{name}/git).

#[MMO\core\attributes\APIRoute('GET|api/checklists/{name}/git/{repository}/diff.json', 'The changes of a release checklist\'s repository: ?from=&to=&path=', mediaTypes: ['json'])] function routeGitDiff(MMO\core\server\Route $route): array
$routeRoutefrom (none: HEAD), to (none: the working tree), path; as mmo.git's DiffController
retournearrayas DiffController::routeDiff; 403 off this machine or without $diffScope

routeGitFile($route)

ChecklistController.php:355

One changed file of a repository of the checklist's recipe, for <mmo-diff>.

#[MMO\core\attributes\APIRoute('GET|api/checklists/{name}/git/{repository}/diff/file.json', 'One changed file of a release checklist\'s repository: ?from=&to=&path=', mediaTypes: ['json'])] function routeGitFile(MMO\core\server\Route $route): array
$routeRouteas routeGitDiff, path the file
retournearrayas DiffController::routeFile

routeList($route)

ChecklistController.php:203
#[MMO\core\attributes\APIRoute('GET|api/checklists.json', 'The release checklists', mediaTypes: ['json'])] function routeList(MMO\core\server\Route $route): array
$routeRoute
retournearray{default, checklists: [{name, title, description, board, version, updatedAt, release, progress, declared}]}: the declared ones first, in their order, then the last changed first

routeLoad($route)

ChecklistController.php:223
#[MMO\core\attributes\APIRoute('GET|api/checklists/{name}.json', 'A release checklist', mediaTypes: ['json'])] function routeLoad(MMO\core\server\Route $route): array
$routeRoute
retournearraythe checklist (answer); an unknown one is empty, version 0

routeOpenAs($route)

ChecklistController.php:446

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 (its actor: the banner « connected as », the journal, login/restore back) --, for a request of this machine (LocalRefusal) whose account holds

#[MMO\core\attributes\APIRoute('GET|developer/open-as?checklist={checklist}&item={?item}&account={?account}&url={?url}', 'Open a checklist\'s page in its test account\'s session (this machine only)', order: -10, mediaTypes: ['html'])] function routeOpenAs(MMO\core\server\Route $route): void
Voir
$openAsScope and the developer layer's dev.checklists. The account is a test one (test.…), the address one of the site (TestAccounts::SiteRelative): never a redirection elsewhere.
$routeRoutechecklist, and item (its id or ref: its account and its page), or account (a profile's key) and url
retournevoid
GET developer/open-as?checklist=my.oviepro-5.0.1&item=R501-999

routeReset($route)

ChecklistController.php:304

Start a new round: every box unchecked, a line of the history saying how far the last one got.

#[MMO\core\attributes\APIRoute('POST|api/checklists/{name}/reset.json', 'Start a new round of a release checklist, every box unchecked: {name}', mediaTypes: ['json'])] function routeReset(MMO\core\server\Route $route): array
$routeRoutea JSON body {name}: the new round's name (a version), empty for none
retournearrayas routeLoad

routeRun($route)

ChecklistController.php:370

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. 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).

#[MMO\core\attributes\APIRoute('POST|api/checklists/{name}/items/{item}/run.json', 'Run the command of a release checklist\'s item, and check it when it passes', mediaTypes: ['json'])] function routeRun(MMO\core\server\Route $route): array
$routeRoute
retournearrayas routeLoad, and run: {command, cwd, exitCode, passed, unwanted, output, duration, checked} (Verdict); 403 when it may not run, 400 when the item has nothing to run

routeSave($route)

ChecklistController.php:234

Create a checklist, or change it: what the body gives replaces what the checklist had (items keep their checks).

#[MMO\core\attributes\APIRoute('PUT|api/checklists/{name}.json', 'Create or change a release checklist: {version, title, description, board, boardUrl, members, recipe, refPrefix, items}', mediaTypes: ['json'])] function routeSave(MMO\core\server\Route $route): array
$routeRoutea JSON body {version, title, description, board, boardUrl, members, recipe, refPrefix, items}: the version the page was given (0 for a new checklist), and what changes
retournearrayas routeLoad; 409 with the checklist as it is when it was saved meanwhile

runFolder($action, $folders)

ChecklistController.php:756
protected function runFolder(array $action, array $folders): ?string
$actionarraya run action
$foldersarray
retournenull | stringwhere it runs: its cwd's repository; else the first folder holding the script it names (php tools/mmo.php: the hub), else the application's; null for a cwd the recipe does not have

runRefusal($server, $allowed)

ChecklistController.php:573
function runRefusal(array $server, ?bool $allowed = null): ?string
$serverarraythe request's ($_SERVER)
$allowed = nullnull | boolwhether the asker holds $runScope; null to ask (can)
retournenull | stringwhy the request may not run a command, null when it may

setBuilt($list, $builder, $declaration)

ChecklistController.php:1023

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.

protected function setBuilt( MMO\admin\helpers\Checklist $list, MMO\admin\helpers\ChecklistBuilder $builder, array $declaration = [] ): void
$listChecklist
$builderChecklistBuilder
$declaration = []arrayas $checklists
retournevoid

SplitCd($command)

staticChecklistController.php:662
static function SplitCd(string $command): array
$commandstring
retournearray?string, 1: string} [folder, command] of cd {folder} && {command}, else [null, command]
ChecklistController::SplitCd('cd ~/dev/src/acme && phpunit'); // ['~/dev/src/acme', 'phpunit']

syncBoard($list, $name)

ChecklistController.php:928

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 $supervisors' ticks.

protected function syncBoard(MMO\admin\helpers\Checklist $list, string $name): void
$listChecklist
$namestringits name: the file not to read again among the others
retournevoid

Verdict($exitCode, $output, $action)

staticChecklistController.php:711

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). Ended with 0 without its match: for a person to read, unchecked.

static function Verdict(int $exitCode, string $output, array $action): array
$exitCodeint
$outputstring
$actionarraya run action
retournearraybool, unwanted: bool}
ChecklistController::Verdict(0, "OK (3 tests)", ['match' => '/^OK \(/m', 'notMatch' => '/FAILURES!/']); // ['passed' => true, 'unwanted' => false]

Words($command)

staticChecklistController.php:671
static function Words(string $command): array
$commandstringa command, without its cd
retournearrayits words, split on spaces -- but EVAL_DRY_RUN, one word
ChecklistController::Words("mongosh demo --eval 'var DRY_RUN = true' scripts/patch/a.js"); // ['mongosh', 'demo', '--eval', "'var DRY_RUN = true'", 'scripts/patch/a.js']
Membres hérités (62)
ConstantesDéclaré parDescription
ALERTiLogLevelAlert: Action must be taken immediately.
ALLiLogLevelMask for all
ALL_PLUSiLogLeveldebug everything
BACKTRACEiLogLevel
COLORSaDataControllerNamed color palettes for chart/report endpoints, e.g.
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
PropriétésDéclaré parDescription
repositoriesaDataController
verbosityaModule
MéthodesDéclaré parDescription
alert($message, $context)aModuleAction must be taken immediately.
backtraces($message, $context)aModuleForce-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)aModuleMerge $config into this module's configuration in the shared Configuration.
critical($message, $context)aModuleCritical conditions. No-op if CRITICAL is currently filtered out by the verbosity mask.
debug($message, $context)aModuleDetailed debug information.
debugName()aModuleHuman-readable identifier used as the default {origin} in this instance's log messages.
DefaultConfig()aModuleThe config a module starts from before anything loaded via Configuration is merged in.
emergency($message, $context)aModuleSystem is unusable. No-op if EMERGENCY is currently filtered out by the verbosity mask.
error($message, $context)aModuleRuntime errors that do not require immediate action but should typically be logged and monitored.
ExtractRoutes($config)aControllerExtract 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()aControllerTells if any APIRoute are registered in the application
info($message, $context)aModuleInteresting 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)aControllerBuild a Link (URL + label/icon/description/title, taken from the route's APIRoute metadata) for a registered route.
log($level, $message, $context)aModuleLogs with an arbitrary level.
notice($message, $context)aModuleNormal 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)aDataControllerSame as aController::onRoute, plus forcing the response to JSON (Response::Json) for every route this controller claims.
Route($method)aControllerGet a registered APIRoute WARNING: if this class was not registered in the application, it will return null.
Routes()aControllerGet 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)aDataControllerRegister the repositories this controller can query, keyed by name (e.g.
setVerbosity($verb)aModuleSet the current verbosity mask, replacing whatever it was before.
Shared()aModuleGet the shared instance, creating (and configuring) it on first call.
testVerbosity($level)aModuleTest whether a given level (or set of levels) is currently enabled by this instance's verbosity mask.
traitUnshare($serialize)aModuleRemove 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)aModuleLike 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)aControllerBuild the URL for a registered route, filling in any {placeholder} from $data.
warning($message, $context)aModuleExceptional occurrences that are not errors.
__construct($config)aModuleprotected constructor, so it is not possible to do new Module(...) called by the serialization process just before being injected with data.
__wakeup()aControllerCalled 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…