Problem
phpc build --project reads phpc.json entry, includes[], and bundles literal __DIR__ includes (#452 ✅). Failures surface late as linker or missing-symbol errors when:
#59 tracks full project graph mode; this issue adds a fast preflight developers can run locally before LLVM compile.
Goal
phpc build --project examples/003-MiniWebApp --dry-run
# or: phpc lint --project examples/003-MiniWebApp
Exit 0 with a printed file list (entry + transitive static includes + manifest paths). Exit 1 with actionable errors before bin/compile.php invokes LLVM.
Implementation hints
| Step |
Files |
Notes |
| Graph BFS |
new lib/AOT/ProjectGraph.php (shared with #59) |
Reuse LiteralIncludeDiscovery + ProjectManifest::includes() |
| CLI |
bin/phpc.php, bin/compile.php |
--dry-run / --project flag |
| Lint integration |
lib/Lint/ProjectLint.php |
Optional: same graph for phpc lint --all |
| Tests |
test/unit/ProjectGraphTest.php |
MiniWebApp manifest lists Router.php, config.php, templates via includes from entry |
Acceptance criteria
docker run --rm -v "$(pwd):/compiler" -w /compiler php-compiler:22.04-dev \
./phpc build --project examples/003-MiniWebApp --dry-run
Prints ≥ public/index.php, src/Router.php, config.php, and discovered template paths. Removing a file from includes[] fails preflight with a clear message.
Verification (local / Docker only)
vendor/bin/phpunit --filter ProjectGraph
No .github/workflows/*.
Dependencies
Related
Problem
phpc build --projectreadsphpc.jsonentry,includes[], and bundles literal__DIR__includes (#452 ✅). Failures surface late as linker or missing-symbol errors when:includes[]lists a path that does not existincludefrompublic/index.phpis not in the manifest and not discoveredrequire_oncetargets are duplicated incorrectly (Language: require_once and include_once deduplication #120)#59 tracks full project graph mode; this issue adds a fast preflight developers can run locally before LLVM compile.
Goal
phpc build --project examples/003-MiniWebApp --dry-run # or: phpc lint --project examples/003-MiniWebAppExit 0 with a printed file list (entry + transitive static includes + manifest paths). Exit 1 with actionable errors before
bin/compile.phpinvokes LLVM.Implementation hints
lib/AOT/ProjectGraph.php(shared with #59)LiteralIncludeDiscovery+ProjectManifest::includes()bin/phpc.php,bin/compile.php--dry-run/--projectflaglib/Lint/ProjectLint.phpphpc lint --alltest/unit/ProjectGraphTest.phpRouter.php,config.php, templates via includes from entryAcceptance criteria
docker run --rm -v "$(pwd):/compiler" -w /compiler php-compiler:22.04-dev \ ./phpc build --project examples/003-MiniWebApp --dry-runPrints ≥
public/index.php,src/Router.php,config.php, and discovered template paths. Removing a file fromincludes[]fails preflight with a clear message.Verification (local / Docker only)
No
.github/workflows/*.Dependencies
Related