Skip to content

AOT: PHPC_DEPLOY_ROOT for deployed template paths (#585)#592

Merged
PurHur merged 2 commits into
masterfrom
issue-585-phpc-deploy-root
May 22, 2026
Merged

AOT: PHPC_DEPLOY_ROOT for deployed template paths (#585)#592
PurHur merged 2 commits into
masterfrom
issue-585-phpc-deploy-root

Conversation

@PurHur
Copy link
Copy Markdown
Owner

@PurHur PurHur commented May 22, 2026

Summary

  • Add phpc_deploy_path($relFromProjectRoot, $fallbackAbsoluteDir) to stdlib (VM + JIT/AOT) reading PHPC_DEPLOY_ROOT at runtime.
  • When phpc build --project bundles sources, rewrite __DIR__ to phpc_deploy_path(...) using paths relative to the project root.
  • Add DeployRootTest (AOT link) proving a binary run from a non-source cwd resolves paths under PHPC_DEPLOY_ROOT.

Test plan

  • vendor/bin/phpunit --group aot-link --filter DeployRootTest (Docker)
  • vendor/bin/phpunit --filter DeployRoot (VM unit tests)
  • script/ci-fast.sh capability/bootstrap checks

Closes #585.

Made with Cursor

PurHur and others added 2 commits May 22, 2026 17:22
Add phpc_deploy_path() (VM + JIT/AOT) and rewrite bundled __DIR__ against
project root so relocated binaries resolve paths under PHPC_DEPLOY_ROOT.
Includes DeployRootTest AOT smoke and SourceBundler project-root wiring.

Co-authored-by: Cursor <cursoragent@cursor.com>
Regenerate bootstrap inventory/profile after conflict resolution.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur PurHur merged commit 5b9003a into master May 22, 2026
@PurHur PurHur deleted the issue-585-phpc-deploy-root branch May 22, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AOT: PHPC_DEPLOY_ROOT for runtime template includes in deployed binaries

1 participant