Category
bootstrap
Problem
docs/bootstrap-inventory.md historically reported 1579 CFG warnings with Unknown Stmt Type: as the dominant bucket. #2254 ✅ added bootstrap-inventory-triage.php; on master (May 2026) phpc lint --bootstrap-inventory is clean (0 CFG gaps).
There is still no actionable worker spec when inventory regresses — this issue is the living checklist to slice Stmt lowering into reviewable PR batches (like M2 spine file batches #2126). Parent coordinator: #2362.
php-src reference
Zend/zend_compile.c — zend_compile_stmt() / statement handlers
Zend/zend_ast.c — statement zend_ast kinds mapped to php-cfg Stmt_*
Repro (detect regression)
./script/docker-exec.sh -- bash -lc 'php script/bootstrap-inventory-triage.php --top 30 | grep "Unknown Stmt" || echo "clean"'
./script/docker-exec.sh -- bash -lc './phpc lint --bootstrap-inventory --check'
Example when a class appears:
./script/docker-exec.sh -- bash -lc './phpc lint --bootstrap-inventory lib/Compiler.php 2>&1 | grep "Unknown Stmt"'
Scope
| Module |
Path |
| Stmt lowering |
lib/Compiler.php — compileStmt() / statement visitors |
| Triage |
script/bootstrap-inventory-triage.php |
| Inventory |
docs/bootstrap-inventory.md, script/bootstrap-inventory.php |
Batch table (May 2026 — inventory clean)
| Stmt class |
Files (est.) |
Child issue / PR |
Status |
| (baseline) |
0 CFG gaps |
— |
✅ clean on master |
Stmt\Unset_ |
— |
#2273 |
✅ landed |
Stmt\Static_ |
— |
#2286 |
✅ function-local static |
Other Stmt\… |
— |
open per-class when ≥5 files |
📋 on regression only |
When inventory regresses: replace the baseline row with top 5 classes from:
php script/bootstrap-inventory-triage.php --top 30 | grep 'Unknown Stmt'
Done when
Verification
./script/docker-exec.sh -- bash -lc 'php script/bootstrap-inventory.php --check'
./script/docker-exec.sh -- bash -lc 'php script/bootstrap-inventory-triage.php --top 30'
Implementation hints
Links
Category
bootstrapProblem
docs/bootstrap-inventory.mdhistorically reported 1579 CFG warnings withUnknown Stmt Type:as the dominant bucket. #2254 ✅ addedbootstrap-inventory-triage.php; on master (May 2026)phpc lint --bootstrap-inventoryis clean (0 CFG gaps).There is still no actionable worker spec when inventory regresses — this issue is the living checklist to slice Stmt lowering into reviewable PR batches (like M2 spine file batches #2126). Parent coordinator: #2362.
php-src reference
Zend/zend_compile.c—zend_compile_stmt()/ statement handlersZend/zend_ast.c— statementzend_astkinds mapped to php-cfgStmt_*Repro (detect regression)
Example when a class appears:
./script/docker-exec.sh -- bash -lc './phpc lint --bootstrap-inventory lib/Compiler.php 2>&1 | grep "Unknown Stmt"'Scope
lib/Compiler.php—compileStmt()/ statement visitorsscript/bootstrap-inventory-triage.phpdocs/bootstrap-inventory.md,script/bootstrap-inventory.phpBatch table (May 2026 — inventory clean)
Stmt\Unset_Stmt\Static_Stmt\…When inventory regresses: replace the baseline row with top 5 classes from:
Done when
phpc lint --bootstrap-inventory --checkgreen on master (regression guard)Unknown Stmt Type:class with ≥5 files gets a child issue (repro snippet + php-srczend_compile.chandler name)--check, row marked ✅ in table aboveVerification
Implementation hints
php script/bootstrap-inventory.phpregen +--check.Links