Repository navigation
AOT: layout partial chain fixture (conditional includes in layout.php, #784) #807
Copy link
Copy link
Closed
Labels
area:compilerCompiler / CFG / JITCompiler / CFG / JITenhancementNew feature or requestNew feature or requestphase-3:aotPhase 3 – AOT deploymentPhase 3 – AOT deployment
Description
Problem
examples/003-MiniWebApp/templates/layout.php performs a second include tier — conditional partials based on $title:
if ('Home' === $title) {
include __DIR__ . '/home.php';
} elseif ('Hello' === $title) {
include __DIR__ . '/hello.php';
}#739 ✅ closed method_include_void.phpt (void method + single trailing include). #776 tracks Router render* + first include. #784 tracks the layout branch includes in the full app.
There is no minimal AOT fixture for nested conditional includes inside a layout template — the pattern that differs from a single include in a void method.
Goal
test/fixtures/aot/cases/layout_partial_chain.phpt passes AOT execute with stdout containing a needle from the selected partial (e.g. HomePartial / HelloPartial).
Scope
- Fixture:
layout.php+home.php+hello.php+entry.phpcalling a void renderer -
@group aot-link+ execute probe - Optional:
htmlspecialchars()in layout<title>(matches MiniWebApp)
Implementation hints
| Piece | Notes |
|---|---|
| Compare | method_include_void_array_property/ — adds typed array prop |
| Compare | deploy_include_template/ — deploy path, not branch includes |
| AOT | lib/AOT/ runtime include resolution for __DIR__ in template TU |
| Parent | #784, #764 |
Reproduce
./script/ci-local.sh --filter layout_partial_chain
docker run --rm -v "$(pwd):/compiler" -w /compiler php-compiler:22.04-dev \
./script/ci-local.sh --filter layout_partial_chainAcceptance criteria
- Fixture execute stdout non-empty with expected partial marker
- When broken, skip/fail cites AOT: layout.php title-branch partial includes (second template tier, #764) #784 / AOT: MiniWebApp native binary CLI execute emits empty stdout (post-link) #764, not AOT: Native user-class object model for phpc build --project #568 (link closed AOT: MiniWebApp phpc build --project native link fails on master (post-#568/#734) #752 ✅)
Dependencies
- AOT: Green method_include_void.phpt and @group aot-link for void+include methods #739 ✅ — void+include baseline
- AOT: Router render* void methods — template include must emit stdout (#764) #776 — Router first include tier
- AOT: layout.php title-branch partial includes (second template tier, #764) #784 — layout integration
- AOT: MiniWebApp native binary CLI execute emits empty stdout (post-link) #764 — project execute
Links
examples/003-MiniWebApp/templates/layout.php- Testing: MiniWebApp AOT unskip matrix after #568 (orchestrate #454 #485 #478 #610) #676 step 2 checklist
- ROADMAP 🗺️ ROADMAP: Self-host + web-capable PHP subset (living) #78 Phase 4
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:compilerCompiler / CFG / JITCompiler / CFG / JITenhancementNew feature or requestNew feature or requestphase-3:aotPhase 3 – AOT deploymentPhase 3 – AOT deployment
Activity
PurHur commentedon May 23, 2026
Closed via #977 — layout_partial_chain.phpt in miniwebapp-bisect ladder.
Testing: add layout_partial_chain AOT bisect fixture (#807) (#977)