Problem
Contributors and docs steer users to ./phpc build, but test/unit/ExamplesCompileTest.php only shells out to bin/compile.php for AOT lint. Wrapper regressions in bin/phpc.php (argv forwarding, env, -o handling) are invisible to the examples CI gate.
test/aot/ExampleWebAotTest.php compiles via bin/compile.php as well — not via phpc build.
Goal
Add at least one examples test that runs ./phpc build -o <tmp> examples/002-StaticWeb/example.php and executes the binary (same assertion as #247 / ExampleWebAotTest::testStaticWebExampleFile).
Keep existing bin/compile.php -l paths for speed; this is an additional smoke, not a full replacement.
Scope
Acceptance criteria
docker run --rm -v "$(pwd):/compiler" -w /compiler php-compiler:22.04-dev \
vendor/bin/phpunit --group llvm --filter 'ExamplesCompileTest.*PhpcBuild'
Verification (local only)
Do not require GitHub Actions.
Dependencies
Related
Problem
Contributors and docs steer users to
./phpc build, buttest/unit/ExamplesCompileTest.phponly shells out tobin/compile.phpfor AOT lint. Wrapper regressions inbin/phpc.php(argv forwarding, env,-ohandling) are invisible to the examples CI gate.test/aot/ExampleWebAotTest.phpcompiles viabin/compile.phpas well — not viaphpc build.Goal
Add at least one examples test that runs
./phpc build -o <tmp> examples/002-StaticWeb/example.phpand executes the binary (same assertion as #247 /ExampleWebAotTest::testStaticWebExampleFile).Keep existing
bin/compile.php -lpaths for speed; this is an additional smoke, not a full replacement.Scope
testPhpcBuildSmoke002StaticWeb()inExamplesCompileTestor shared trait withExampleWebAotTest@group llvm— skip when toolchain missingHello Worldand exit 0script/ci-local.shLLVM stageAcceptance criteria
Verification (local only)
Do not require GitHub Actions.
Dependencies
Related
phpc.jsonstubs