You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today each file is compiled in isolation (bin/compile.php file.php or phpc build entry.php). Multi-file apps need documented flags and manual dependency tracking (#59). phpc serve --aot already reads a minimalphpc.json via lib/Web/ProjectManifest.php (binary field only) — but there is no schema, validator, or phpc build --project graph compile.
Problem
Today each file is compiled in isolation (
bin/compile.php file.phporphpc build entry.php). Multi-file apps need documented flags and manual dependency tracking (#59).phpc serve --aotalready reads a minimalphpc.jsonvialib/Web/ProjectManifest.php(binaryfield only) — but there is no schema, validator, orphpc build --projectgraph compile.Goal
phpc.jsonat project root:{ "entry": "public/index.php", "binary": ".phpc/bin/app", "include_path": ["src"], "compile": { "superglobals": "runtime" }, "assets": ["public/**"] }One command builds a deployable binary from the manifest;
phpc serve --aotresolves the same paths.Implementation hints
ProjectManifest(lib/Web/ProjectManifest.php) — already walks parents forbinary; addentry,include_path, optionalassetsglob list.phpc build --project [dir]inbin/phpc.php→ delegate tobin/compile.phpwith resolved entry +-ofrom manifest (until AOT: Project build mode (entry file + dependency graph) #59 multi-TU graph exists, document single-entry limitation).phpc validate-manifest); start with JSON Schema indocs/phpc-json-schema.json.examples/003-MiniWebApp/phpc.jsononce Reference: MiniWebApp lint-first skeleton (examples/003-MiniWebApp) #246 scaffold lands.Tasks
phpc build --projectreads manifest, invokes compile with entry pathProjectManifest::resolveEntry()for serve-aot docroot scriptsphpc.jsonAcceptance criteria
Verify in Docker only:
docker run --rm -v "$(pwd):/compiler" -w /compiler php-compiler:22.04-dev \ ./phpc build --project examples/001-SimpleWebDependencies
Related