Problem
#478 covers phpc serve --aot HTTP routes. #454 tracks ExamplesCompileTest for the 003 tree. There is no PHPUnit gate that:
phpc build --project examples/003-MiniWebApp (link green — AOT: MiniWebApp phpc build --project native link fails on master (post-#568/#734) #752 ✅)
Runs .phpc/bin/app without TCP , with CGI env (QUERY_STRING, REQUEST_METHOD, REQUEST_BODY)
CLI execute catches AOT runtime bugs earlier than ServeAotTest and matches production CGI deployment (#50 ).
Active blocker: #764 — binary exits 0 with empty stdout for home/hello routes (not link failure).
Goal
test/unit/MiniWebAppAotExecuteTest.php (tracked in #747 ; implement here or split methods):
Step
Assert
Build
phpc build --project exit 0
GET home
QUERY_STRING=route=home stdout contains app_name from config.php
GET hello
QUERY_STRING=route=hello&name=Dev greeting
POST contact
REQUEST_METHOD=POST + REQUEST_BODY=name=PostDev thank-you (#257 pattern)
GET api
JSON ok (#61 )
PATH_INFO
PATH_INFO=/hello + QUERY_STRING=name=Dev (#489 )
Start with markTestSkipped('Blocked by #764 — AOT execute empty stdout') until runtime green.
Implementation hints
Piece
File
Notes
Test class
test/unit/MiniWebAppAotExecuteTest.php
@group llvm, @group miniwebapp
Helper
runBinaryWithCgiEnv(string $binary, array $env): array
proc_open + putenv before exec; share with #773 if landed
Env
Mirror ExamplesCompileTest 001 POST pattern (#259 )
REQUEST_BODY for POST
Deploy
PHPC_DEPLOY_ROOT optional case
#612 dist layout
Root cause
#764 , #776
void include templates; #767 typed array $config
# Manual repro (Docker, apply patches):
composer install && ./script/apply-patches.sh
php bin/phpc.php build --project examples/003-MiniWebApp
cd examples/003-MiniWebApp
QUERY_STRING=route=home REQUEST_METHOD=GET ./.phpc/bin/app | wc -c
Acceptance criteria
./script/ci-local.sh --filter MiniWebAppAotExecuteTest
# After #764 + #747:
MINIWEBAPP_AOT_EXECUTE_GATE=1 ./script/ci-local.sh --filter MiniWebAppAotExecuteTest
Harness (empty bind-mount):
./script/docker-ci-local.sh --filter MiniWebAppAotExecuteTest
No GitHub Actions.
Dependencies
Links
Problem
#478 covers
phpc serve --aotHTTP routes. #454 tracksExamplesCompileTestfor the 003 tree. There is no PHPUnit gate that:phpc build --project examples/003-MiniWebApp(link green — AOT: MiniWebApp phpc build --project native link fails on master (post-#568/#734) #752 ✅).phpc/bin/appwithout TCP, with CGI env (QUERY_STRING,REQUEST_METHOD,REQUEST_BODY)CLI execute catches AOT runtime bugs earlier than
ServeAotTestand matches production CGI deployment (#50).Active blocker: #764 — binary exits 0 with empty stdout for home/hello routes (not link failure).
Goal
test/unit/MiniWebAppAotExecuteTest.php(tracked in #747; implement here or split methods):phpc build --projectexit 0QUERY_STRING=route=homestdout containsapp_namefromconfig.phpQUERY_STRING=route=hello&name=DevgreetingREQUEST_METHOD=POST+REQUEST_BODY=name=PostDevthank-you (#257 pattern)ok(#61)PATH_INFO=/hello+QUERY_STRING=name=Dev(#489)Start with
markTestSkipped('Blocked by #764 — AOT execute empty stdout')until runtime green.Implementation hints
test/unit/MiniWebAppAotExecuteTest.php@group llvm,@group miniwebapprunBinaryWithCgiEnv(string $binary, array $env): arrayproc_open+putenvbefore exec; share with #773 if landedExamplesCompileTest001 POST pattern (#259)REQUEST_BODYfor POSTPHPC_DEPLOY_ROOToptional caseincludetemplates; #767 typedarray $configAcceptance criteria
./script/ci-local.sh --filter MiniWebAppAotExecuteTest # After #764 + #747: MINIWEBAPP_AOT_EXECUTE_GATE=1 ./script/ci-local.sh --filter MiniWebAppAotExecuteTestHarness (empty bind-mount):
No GitHub Actions.
Dependencies
Links