Skip to content

feat: allow to customize EmbeddedAppPath#2198

Open
dunglas wants to merge 1 commit intomainfrom
feat/custom-EmbeddedAppPath
Open

feat: allow to customize EmbeddedAppPath#2198
dunglas wants to merge 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
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.

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