Problem
lib/Web/ProjectManifest.php reads a minimal phpc.json (binary field for phpc serve --aot). #106 and #155 will add entry, public, includes, and PSR-4 autoload, but there is no machine-readable schema or validator—typos fail late at serve/build time.
Goal
docs/phpc-json.schema.json (or schema/phpc.json) describing supported keys
./phpc validate-manifest [dir] exits 0/1 with actionable errors (unknown keys, bad paths, missing public/index.php)
Scope (v1)
Acceptance criteria
echo '{"binary": "missing"}' > /tmp/phpc.json
./phpc validate-manifest /tmp
# exit 1, message: binary path not found
Verification (local only)
docker run --rm -v "$(pwd):/compiler" -w /compiler php-compiler:22.04-dev \
vendor/bin/phpunit --filter ProjectManifest
Dependencies
Related
lib/Web/ProjectManifest.php, bin/serve-aot.php
Problem
lib/Web/ProjectManifest.phpreads a minimalphpc.json(binaryfield forphpc serve --aot). #106 and #155 will addentry,public,includes, and PSR-4autoload, but there is no machine-readable schema or validator—typos fail late at serve/build time.Goal
docs/phpc-json.schema.json(orschema/phpc.json) describing supported keys./phpc validate-manifest [dir]exits 0/1 with actionable errors (unknown keys, bad paths, missingpublic/index.php)Scope (v1)
binary, optionalpublicentry,includes,autoload.psr-4(document as optional until implemented)bin/phpc.phpsubcommand; no external deps beyondjson_decodephpc doctor(DevEx: phpc doctor — probe LLVM, extensions, and loopback bind #253) may call validator whenphpc.jsonexistsAcceptance criteria
Verification (local only)
docker run --rm -v "$(pwd):/compiler" -w /compiler php-compiler:22.04-dev \ vendor/bin/phpunit --filter ProjectManifestDependencies
Related
lib/Web/ProjectManifest.php,bin/serve-aot.php