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
#752 ✅ / #59 shipped static project build: phpc.jsonincludes[] + ProjectGraph BFS over literal require paths. 003-MiniWebApp and self-host bundles rely on explicit manifest lists.
Remaining gap: apps that use dynamic includes (require $path, PSR-4 autoload, conditional requires) cannot phpc build --project without manually listing every file. Self-host M4/M5 needs either full graph discovery or documented static bundling policy.
#154 phase 1 (explicit multi-TU link) is largely shipped; this tracks phase 2.
#1803 / #1856 cover phpc.json autoload schema + migrating 003 — this issue is the compiler graph walk that consumes that manifest.
php-src reference
N/A (tooling) — behavior mirrors Zend autoload + compile-time include resolution patterns used by OPcache preloading
Compare: php-src ext/opcache preload file list build; PSR-4 equivalent in Composer ClassLoader.php
Repro (failure today)
test/fixtures/aot/projects/psr4_mini/ (to be added) with:
Expected (after fix): link succeeds; /tmp/psr4_mini prints greeting. Actual today: unresolved class / missing TU unless src/Greeter.php hand-listed in includes[].
Category
bootstrap|language(AOT project graph)Problem
#752 ✅ / #59 shipped static project build:
phpc.jsonincludes[]+ProjectGraphBFS over literalrequirepaths. 003-MiniWebApp and self-host bundles rely on explicit manifest lists.Remaining gap: apps that use dynamic includes (
require $path, PSR-4 autoload, conditional requires) cannotphpc build --projectwithout manually listing every file. Self-host M4/M5 needs either full graph discovery or documented static bundling policy.#154 phase 1 (explicit multi-TU link) is largely shipped; this tracks phase 2.
#1803 / #1856 cover
phpc.jsonautoload schema + migrating 003 — this issue is the compiler graph walk that consumes that manifest.php-src reference
includeresolution patterns used by OPcache preloadingext/opcachepreload file list build; PSR-4 equivalent in ComposerClassLoader.phpRepro (failure today)
test/fixtures/aot/projects/psr4_mini/(to be added) with:{ "entry": "public/index.php", "autoload": { "psr-4": { "App\\": "src/" } } }./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php bin/compile.php --project test/fixtures/aot/projects/psr4_mini -o /tmp/psr4_mini 2>&1'Expected (after fix): link succeeds;
/tmp/psr4_miniprints greeting.Actual today: unresolved class / missing TU unless
src/Greeter.phphand-listed inincludes[].Dynamic require lint:
Goal
phpc build --projectoptionally discovers PHP files reachable from entry via:require/require_once/include(extend Language: include/require in JIT and AOT (multi-file applications) #54 AOT lowering)phpc.json"autoload": { "psr-4": { "App\\": "src/" } }— compile referenced classes (DevEx: PSR-4 autoload paths in phpc.json project manifest #155)require $var)Scope (this repo)
lib/AOT/ProjectGraph.phplib/Web/ProjectManifest.phpautoload.psr-4; validate paths existlib/AOT/AutoloadResolver.phpApp\Router→src/Router.php(PSR-4)lib/Compiler.phpTYPE_INCLUDEliteral targets in compile unit metadatabin/lint.php,UnsupportedRegistryphpc lint --projectreports unresolved dynamic includeslib/AOT/Linker.php.oalready works (#752)test/unit/ProjectGraphTest.php,test/fixtures/aot/projects/psr4_mini/Suggested fixture layout
Unblock order
Lint error shape (actionable)
Done when
phpc build --project test/fixtures/aot/projects/psr4_minilinks and executes without handincludes[]phpc lint --projecterrors onrequire $dynamicwith file:line + hint./script/ci-local.sh --filter ProjectGraphgreen (new psr4_mini case)Verification
Dependencies
phpc.jsonautoload schemaLinks