Skip to content

feat: allow to customize EmbeddedAppPath#2198

Merged
dunglas merged 1 commit intomainfrom
feat/custom-EmbeddedAppPath
Feb 18, 2026
Merged

feat: allow to customize EmbeddedAppPath#2198
dunglas merged 1 commit intomainfrom
feat/custom-EmbeddedAppPath

Conversation

@dunglas
Copy link
Member

@dunglas dunglas commented Feb 17, 2026

This allows customizing the path where to extract the embedded app. This is useful when the app itself depends on absolute pathes.

// EmbeddedAppPath contains the path of the embedded PHP application (empty if none).
// It can be set at build time using -ldflags to override the default extraction path:
//
// go build -ldflags "-X github.com/dunglas/frankenphp.EmbeddedAppPath=/app" ...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there no simpler way than hijacking ldflags for this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would be the benefit? It's a niche use, and ldflags are designed for that.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that's true. We should expose it in build-static.sh though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's already exposed through XCADDY_ARGS.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@dunglas dunglas force-pushed the feat/custom-EmbeddedAppPath branch from f44833d to cfcbe70 Compare February 18, 2026 13:28
@dunglas dunglas merged commit bb3f730 into main Feb 18, 2026
27 of 28 checks passed
@dunglas dunglas deleted the feat/custom-EmbeddedAppPath branch February 18, 2026 15:30
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.

2 participants

Comments