Skip to content

Frankenphp version shows "dev" in phpinfo() output #577

@hookenz

Description

@hookenz

Steps To Reproduce

Copy a file "phpinfo.php' to a public directory on your Franken server containing:

<?php
phpinfo();

View it from your browser

Image

Outcome

What did you expect?

FrankenPHP version would show the actual FrankenPHP version.

What happened instead?

It displays "dev". I assume that's the default if the version isn't passed into xcaddy.

Affected Docker Images

beta-8.4-frankenphp-bookworm

Anything else?

I think it might have something to do with the optional version argument that you can pass into xcaddy

See: https://github.com/caddyserver/xcaddy

This might work

xcaddy build v${FRANKENPHP_VERSION} \
        --output /usr/local/bin/frankenphp \
        --with github.com/dunglas/frankenphp=./ \
        --with github.com/dunglas/frankenphp/caddy=./caddy/ \
        --with github.com/dunglas/caddy-cbrotli \
...

^^^ It doesn't.

I think you need to pass this to the linker flags when building. Which is the default when building frankenphp. If you look in it's dockerfile.

-X 'github.com/caddyserver/caddy/v2.CustomVersion=FrankenPHP $FRANKENPHP_VERSION PHP $PHP_VERSION Caddy'

I tried it, but couldn't quite get it right. I think it didn't like my quote escaping or something.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions