Skip to content

AOT: MiniWebApp dist-layout smoke with PHPC_DEPLOY_ROOT (post #609 deploy) #612

@PurHur

Description

@PurHur

Problem

#585 ✅ rewrites template __DIR__ includes to phpc_deploy_path() in bundled sources. DeployRootTest proves a minimal temp project. There is no end-to-end gate that:

  1. Builds / deploys examples/003-MiniWebApp into a dist directory (AOT: phpc deploy bundles binary, public/, assets/, and phpc.json into dist/ #609 ✅)
  2. Sets PHPC_DEPLOY_ROOT to that dist
  3. Runs the native binary with CGI env and asserts HTML needles from templates/layout.php

Without this, production deploy regressions slip past VM phpc serve and unit tests.

Goal

test/aot/MiniWebAppDeployLayoutTest.php (@group llvm, @group aot-link, @group miniwebapp):

phpc deploy examples/003-MiniWebApp -o /tmp/mini-dist   # after #568 link
PHPC_DEPLOY_ROOT=/tmp/mini-dist QUERY_STRING=route=home REQUEST_METHOD=GET \
  /tmp/mini-dist/bin/app
# stdout contains MiniWebApp + layout partial

PATH_INFO variant: PATH_INFO=/hello + QUERY_STRING=name=Deploy.

While blocked: markTestSkipped#568.

Implementation hints

Piece File Notes
Test test/aot/MiniWebAppDeployLayoutTest.php Copy env helpers from DeployRootTest
Deploy lib/Web/ProjectDeploy.php Assert templates/, public/, assets/ copied
Includes #623 Runtime phpc_deploy_path() for templates
CI script/ci-local.sh @group aot-link phase after ExamplesCompileTest
CGI #682 Optional second test via cgi-wrapper in dist

Harness

docker run --rm -v "$(pwd):/compiler" -w /compiler php-compiler:22.04-dev \
  ./script/ci-local.sh --filter MiniWebAppDeployLayoutTest

Acceptance criteria

Dependencies

Verification

Local/Docker only — not GitHub Actions.

Links

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions