Skip to content

phpc deploy: bundle binary, public/, assets/, phpc.json into dist/#615

Merged
PurHur merged 1 commit into
masterfrom
issue-609-phpc-deploy
May 22, 2026
Merged

phpc deploy: bundle binary, public/, assets/, phpc.json into dist/#615
PurHur merged 1 commit into
masterfrom
issue-609-phpc-deploy

Conversation

@PurHur
Copy link
Copy Markdown
Owner

@PurHur PurHur commented May 22, 2026

Summary

  • Add lib/Web/ProjectDeploy to copy AOT binary → bin/app, phpc.json, optional public/, assets/, templates/, and README.deploy with traversal-safe path checks.
  • Wire phpc deploy [dir] -o <dist> [--from-build] in bin/phpc.php; runs phpc build --project when the binary is missing.
  • Add test/unit/PhpcDeployTest.php (copy-only fixture + CLI smoke when examples/002-StaticWeb binary exists).

Test plan

  • php vendor/bin/phpunit --filter PhpcDeployTest (Docker tar pipe)
  • ./phpc deploy examples/002-StaticWeb -o /tmp/static-dist --from-build after build (Docker)
  • PhpcCliTest help lists phpc deploy

Fixes #609

Made with Cursor

Add ProjectDeploy and `phpc deploy -o` to copy bin/app, phpc.json,
public/, assets/, templates/, and README.deploy with path traversal checks.
Builds the project binary first unless --from-build is set.

Fixes #609

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur PurHur merged commit 426b28c into master May 22, 2026
@PurHur PurHur deleted the issue-609-phpc-deploy branch May 22, 2026 18:03
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 bundles binary, public/, assets/, and phpc.json into dist/

1 participant