Closed joelwurtz closed 5 months ago
If the problem only occurs with a recent build, it may be related to a major version upgrade of phpmicro. Could you provide a minimal reproducible phar or a process for building a phar?
With phar on this release : https://github.com/jolicode/castor/releases/tag/v0.17.1 i get the error
We execute those commands :
spc 'download' '--for-extensions=mbstring,phar,posix,tokenizer,pcntl,curl,filter,openssl' '--with-php=8.3'
spc 'build' 'mbstring,phar,posix,tokenizer,pcntl,curl,filter,openssl' '--build-micro' '--with-micro-fake-cli' '--arch=x86_64'
spc 'micro:combine' 'castor.linux-amd64.phar' '--output=castor.linux-amd64'
I just asked the author of phpmicro and debugged with him and found out that it should be a bug in phpmicro itself. We will fix it tomorrow.
phpmicro has fixed phar issue, remember cleaning buildroot
and source
, and bin/spc del-download micro && bin/spc download micro
to download the latest micro repo to build.
Thanks a lot <3, and also thanks to the author of phpmicro for its quick reaction.
It seems to be working with last SPC version, however older versions still have the bug, (i think this fork https://github.com/static-php/phpmicro should be updated in order to make it work on older versions)
I've updated static-php fork repo 👏
@crazywhalecc This new phpmicro update resolved the initial error, but now I'm getting a new error.
I followed the instructions to remove the buildroot
and source
folders bin/spc del-download micro && bin/spc download micro
However, when I try to run the binary with ./my-binary
it shows the hyperf commands normally.
Now if I try to run the server with the command ./my-binary start
, it shows error logs
Not sure what changed, but since a few days when we try to build micro and adding a phar to it does not work anymore, we go those kind of errors:
I try using different versions of SPC, use specific version of PHP and even checkout specific version of
phpmicro
but we keep having this failure, not sure where it fails here.Do you have some inputs on how to debug this so we can fix this error ?