Problem
#585 ✅ added PHPC_DEPLOY_ROOT / phpc_deploy_path() so AOT binaries can include templates at runtime when sources are not beside the executable. #594 ✅ serves /assets/* from a manifest assets/ directory under phpc serve.
There is still no packaging CLI that produces a production-shaped tree contributors can copy behind nginx/CGI (#180, #445). Today authors hand-copy public/, assets/, and the binary.
Goal
phpc deploy examples/003-MiniWebApp -o dist/003-miniwebapp
# or: phpc build --project … && phpc deploy --from-build
Emit:
dist/003-miniwebapp/
bin/app # AOT binary from phpc.json "binary"
public/ # copied docroot (index.php may be omitted if fully bundled)
assets/ # copied when manifest has "assets"
templates/ # optional copy when not fully bundled into binary
phpc.json
README.deploy # env vars: PHPC_DEPLOY_ROOT, QUERY_STRING, PHP_COMPILER_DEBUG
Scope
Acceptance criteria
./phpc deploy examples/002-StaticWeb -o /tmp/static-dist
test -x /tmp/static-dist/bin/app -o -f /tmp/static-dist/phpc.json
When #568 lands, extend fixture to examples/003-MiniWebApp and assert assets/style.css + templates/layout.php exist in dist.
Harness (Docker):
docker run --rm -v "$(pwd):/compiler" -w /compiler php-compiler:22.04-dev \
./phpc deploy examples/002-StaticWeb -o /tmp/static-dist
No GitHub Actions.
Dependencies
Links
Problem
#585 ✅ added
PHPC_DEPLOY_ROOT/phpc_deploy_path()so AOT binaries canincludetemplates at runtime when sources are not beside the executable. #594 ✅ serves/assets/*from a manifestassets/directory underphpc serve.There is still no packaging CLI that produces a production-shaped tree contributors can copy behind nginx/CGI (#180, #445). Today authors hand-copy
public/,assets/, and the binary.Goal
phpc deploy examples/003-MiniWebApp -o dist/003-miniwebapp # or: phpc build --project … && phpc deploy --from-buildEmit:
Scope
bin/phpc.phpsubcommanddeploy(orbin/deploy.phpwrapper)lib/Web/ProjectManifest.php(entry,binary,public,assets)..traversal)PHPC_DEPLOY_ROOT=<dist>for template includes rewritten bySourceBundler(AOT: PHPC_DEPLOY_ROOT for runtime template includes in deployed binaries #585)test/unit/PhpcDeployTest.php— temp project → dist layout assertions (no LLVM required for copy-only path)Acceptance criteria
./phpc deploy examples/002-StaticWeb -o /tmp/static-dist test -x /tmp/static-dist/bin/app -o -f /tmp/static-dist/phpc.jsonWhen #568 lands, extend fixture to
examples/003-MiniWebAppand assertassets/style.css+templates/layout.phpexist in dist.Harness (Docker):
docker run --rm -v "$(pwd):/compiler" -w /compiler php-compiler:22.04-dev \ ./phpc deploy examples/002-StaticWeb -o /tmp/static-distNo GitHub Actions.
Dependencies
phpc build --project+ dry-run graph (binary must exist or deploy runs build first)Links
lib/Web/DeployRoot.php,test/unit/DeployRootTest.php