Category
bootstrap · blocks #1492 / #9068 after Unknown-type fixes
Problem
php script/bootstrap-inventory-triage.php ranks the top self-host CFG gap as 867 files failing parse/compile with:
Cannot use PHPCompiler\Frame as Frame because the name is already in use on line 7
Similar collisions for Context, BasicBlockHelper, VmString, VmReflection, etc. across ext/* JIT lowering files. These are not Zend parity gaps — they block compiling lib/ + ext/ through the native bootstrap pipeline even when link succeeds (make bootstrap-selfhost-link).
Snapshot: docs/bootstrap-inventory-triage-top50.json (regenerate via triage script).
php-src reference
N/A (self-host compile hygiene). Pattern: PSR-12 use + short class name reuse in same file.
Repro
php script/bootstrap-inventory-triage.php | head -25
# Rank 1: Frame alias collision — 867 files
./script/docker-exec.sh -- bash -lc 'make bootstrap-selfhost-helloworld'
# Often fails earlier on Unknown type (#9068); import-alias failures appear compiling ext/standard JIT units
Example paths: ext/bcmath/BcmathFunction.php, ext/standard/JitArrayPush.php, lib/VM/Builtin/DateTimeFormat.php.
Scope (this repo)
| Layer |
Path |
| Mechanical fix |
ext/**, lib/JIT/** — normalize imports (use PHPCompiler\Frame as VmFrame or fully-qualified names) |
| Guard |
script/bootstrap-inventory.php / triage — keep ranking alias collisions |
| Docs |
docs/bootstrap-inventory.md regeneration after gap count drops |
PHP-in-PHP first: fix imports in PHP sources; no new runtime/*.c.
Done when
Related
Category
bootstrap· blocks #1492 / #9068 after Unknown-type fixesProblem
php script/bootstrap-inventory-triage.phpranks the top self-host CFG gap as 867 files failing parse/compile with:Similar collisions for
Context,BasicBlockHelper,VmString,VmReflection, etc. acrossext/*JIT lowering files. These are not Zend parity gaps — they block compilinglib/+ext/through the native bootstrap pipeline even when link succeeds (make bootstrap-selfhost-link).Snapshot:
docs/bootstrap-inventory-triage-top50.json(regenerate via triage script).php-src reference
N/A (self-host compile hygiene). Pattern: PSR-12
use+ short class name reuse in same file.Repro
Example paths:
ext/bcmath/BcmathFunction.php,ext/standard/JitArrayPush.php,lib/VM/Builtin/DateTimeFormat.php.Scope (this repo)
ext/**,lib/JIT/**— normalize imports (use PHPCompiler\Frame as VmFrameor fully-qualified names)script/bootstrap-inventory.php/ triage — keep ranking alias collisionsdocs/bootstrap-inventory.mdregeneration after gap count dropsPHP-in-PHP first: fix imports in PHP sources; no new
runtime/*.c.Done when
Framecollision count → 0 (or documented allowlist)php script/bootstrap-inventory.php --checkgreen after regenmake bootstrap-selfhost-helloworldprogresses past ext JIT compile units (may still hit Self-host: bootstrap-selfhost-helloworld fails (compile_driver) — parseAndCompile 'Unknown type encountered' #9068 separately)make north-star5-verify-fastunchanged or greenerRelated