Index

ChecklistBuilder

MMO\admin\helpers · 1 symbol · generated 5 Oct 2026

class

ChecklistBuilder

ChecklistBuilder.php:44

Builds the items of a release checklist (Checklist) from its recipe: what changed in the repositories, what the board's tickets say to check, and what no ticket covers.

class MMO\admin\helpers\ChecklistBuilder
Namespace
MMO\admin\helpers
The recipe, kept in the checklist (`recipe`): {"repositories": [{"label": "my.oviepro", "path": "~/dev/src/my.oviepro", "exclude": ["libs/"], "together": ["modules/IJSS/"]}], "treated": "/\\*\\*Claude — (résultat|result)\\*\\* /u", "site": "http://localhost/my.oviepro/", "pages": "my.oviepro — pages", "checks": {"12": {"page": "declaration/MaladiePro", "check": "INRS references readable", "url": "gestion/maladies"}}, "items": [{"group": "before committing", "section": "verify", "title": "`php tools/mmo.php verify` passes", "detail": "..."}], "itemsFile": "src/pages/admin/release-checklist.items.json", "texts": {"diff": "Relire le diff : `git -C {root} diff -- {path}`", ...}} - **repositories**: one `code` item per changed file (`git status`), grouped under the repository's label and a section for its folder ([`section`](https://mcp.mmoframework.fr/documentation/mmo.admin/php/helpers/ChecklistBuilder.md#checklistbuilder-section)). A path of `together` is one item for all its files (a deleted module, a folder of fonts), a path of `exclude` is left out (a hub's `libs/`, whose submodules are repositories of their own). A file of `src/pages` is in its page's section, unless `"pages": false` (a library, whose `src/pages` are not its own). An item names the tickets whose discussion cites the file ([`mentions`](https://mcp.mmoframework.fr/documentation/mmo.admin/php/helpers/ChecklistBuilder.md#checklistbuilder-mentions)): a file no ticket cites is a transverse change. - **treated**: a regular expression; a ticket whose discussion matches it was treated, and gets a functional check. The default matches the result comment an agent writes (`**Claude — résultat**`, `**Claude — result**`). - **checks**: the functional check of a ticket, on a page. Without one, the last ```` ```check ```` block of the ticket's discussion (else of its description) gives them, one per line: `page | what to check`, or `page | url | what to check`. A treated ticket with neither gets an item asking to check its result on screen. - **site**: what a relative `url` is relative to. **pages**: the group of the functional checks. - **items** / **itemsFile**: items written by hand -- what to do before committing, what to clean up after. The file is flat items, or a page by page functional test: `{members, types, sections: [{label, icon, pages: [{label, path, note, checks: [{label, type}]}]}]}`, whose `members`, `types` and sections' icons the checklist takes too ([`meta`](https://mcp.mmoframework.fr/documentation/mmo.admin/php/helpers/ChecklistBuilder.md#checklistbuilder-meta)).
$board = KanbanBoard::Edit('boards/acme.json', fn(KanbanBoard $b) => $b); $builder = new ChecklistBuilder(['repositories' => [['label' => 'acme', 'path' => '~/dev/src/acme']]], $board); $items = $builder->build(); $builder->orphans(); // the files no ticket cites

Properties8

ambiguous

array $ambiguous = […6 items]
Type
array

bodies

protected array $bodies = []
Type
array

items

protected array $items = []
Type
array

meta

protected array $meta = ['members' => [], 'types' => [], 'groups' => []]
Type
array

recipe

protected array $recipe
Type
array

texts

array $texts = […16 items]
Type
array

treated

string $treated = '/\\*\\*Claude — (résultat|result)\\*\\*/u'
Type
string

Methods21

build()

ChecklistBuilder.php:85
function build(): array
returnsarraythe items, in the order the page shows them: written by hand, the code, the pages

CheckBlock($markdown)

staticChecklistBuilder.php:280
static function CheckBlock(string $markdown): array
$markdownstring
returnsarraystring, check: string, url: ?string}> the lines of its last ``` `check ``` block
ChecklistBuilder::CheckBlock("```check\nhome | the logo is whole\n```"); // [['page' => 'home', 'check' => 'the logo is whole', 'url' => null]]

checksOf($id)

ChecklistBuilder.php:261
function checksOf(string $id): array
$idstring
returnsarraystring, check: string, url?: ?string}> the functional checks of a ticket: from the recipe's checks, else from the last ``` `check ``` block of its discussion, else of its description

ExpandBraces($text)

staticChecklistBuilder.php:384
static function ExpandBraces(string $text): string
$textstring
returnsstring$text with its a/{b,c}.d written out: a/b.d a/c.d, the way an agent names several files at once
ChecklistBuilder::ExpandBraces('src/views/{A,B}.jhs'); // 'src/views/A.jhs src/views/B.jhs'

mentions($path)

ChecklistBuilder.php:299
function mentions(string $path): array
$pathstringa file, from its repository
returnsarraythe treated tickets whose discussion cites it: by its path, or by its last three or two parts

meta()

ChecklistBuilder.php:106
function meta(): array
returnsarraylist<string>, types: array<string, array{label: string, icon: string}>, groups: array<string, array{icon: string}>} what the last build read besides the items: the members of a page by page file, what each type of check is called (the file's types, the recipe's over them), each section's icon

Path($path)

staticChecklistBuilder.php:362
static function Path(string $path): string
$pathstring
returnsstringa path of the recipe: ~/ is the home folder of whoever owns the application's folder -- the developer, not the web server running the request -- {root}... as filename
ChecklistBuilder::Path('~/dev/src/acme'); // '/home/marc/dev/src/acme'

section($path, $pages)

ChecklistBuilder.php:319
function section(string $path, bool $pages = true): string
$pathstringa file, from its repository
$pages = trueboolwhether src/pages holds the pages of an application (mmo.client): a page is then in its page's section
returnsstringits section: its folder, two or three levels deep; a page's folder for a page

sectionsItems($json)

ChecklistBuilder.php:170
protected function sectionsItems(array $json): array
$jsonarray{sections: [{label, icon, pages: [{label, path, note, checks: [{label, type}]}]}]}
returnsarrayone item per check: the section is the group, the page the section

source()

ChecklistBuilder.php:116
function source(): ?string
returnsnull | stringwhat the items depend on when they come from the recipe alone (items, itemsFile): its hash, which changes when the file or the recipe does; null for a recipe reading repositories or a board, which only a build says
(new ChecklistBuilder(['itemsFile' => '{root}/checklists/general.json']))->source(); // 'a3f1...'

Status($root)

staticChecklistBuilder.php:342
static function Status(string $root): array
$rootstringa repository
returnsarraystring, 1: string}> [state, path] for each changed file: M, D, ??, A, R, T

unmatched()

ChecklistBuilder.php:128
function unmatched(): array
returnsarraythe treated tickets no code item names: fixed without a change, or cited in a form the search misses