Skip to content

feat: implement APP_START_CMD for standalone PHP applications#1231

Merged
ramonskie merged 1 commit intofeat/additional-preprocess-cmdsfrom
feat/app-start-cmd
Feb 25, 2026
Merged

feat: implement APP_START_CMD for standalone PHP applications#1231
ramonskie merged 1 commit intofeat/additional-preprocess-cmdsfrom
feat/app-start-cmd

Conversation

@ramonskie
Copy link
Contributor

Summary

Implements APP_START_CMD support for standalone PHP applications (workers, daemons, CLI apps), restoring full v4.x parity for non-web PHP apps.

Changes

Options Parsing (src/php/options/options.go)

  • Parse APP_START_CMD from .bp-config/options.json
  • Auto-detect standalone mode when WEB_SERVER is set to "none" and a single .php file exists at app root

Finalize Phase (src/php/finalize/finalize.go)

  • Generate Procfile with web: php <APP_START_CMD> when in standalone mode
  • Support auto-detection: if only one .php file at root and no web server configured, use it as the start command
  • Skip web server and PHP-FPM config when in standalone mode

Integration Tests (src/php/integration/standalone_test.go)

  • Explicit APP_START_CMD via options.json
  • Auto-detection of single PHP file at root

Fixtures

  • fixtures/standalone_app/ — worker app with explicit APP_START_CMD
  • fixtures/standalone_autodetect/ — app relying on auto-detection

Usage

{
  "WEB_SERVER": "none",
  "APP_START_CMD": "worker.php"
}

Or simply place a single .php file at the app root with no web server configured.


Depends on: #1230 (ADDITIONAL_PREPROCESS_CMDS) → #1229 (PHP version placeholders) → #1226 (remove runtime rewrite binary)

@ramonskie ramonskie merged commit d44f9b7 into feat/additional-preprocess-cmds Feb 25, 2026
1 check passed
@ramonskie ramonskie deleted the feat/app-start-cmd branch February 25, 2026 16:35
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.

1 participant