Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instructions on using PHAR bundles with phpmicro #3

Open
ryangjchandler opened this issue Jun 16, 2022 · 6 comments
Open

Instructions on using PHAR bundles with phpmicro #3

ryangjchandler opened this issue Jun 16, 2022 · 6 comments

Comments

@ryangjchandler
Copy link

Hey, looking to use this alongside a PHAR bundle produced with the Box library. I downloaded the latest build from the workflow artifacts.

Upon concatenating the 2 files together, PHP reports that the PHAR is corrupted.

Am I missing a crucial step, or does phpmicro not have PHAR support out of the box?

@dixyes
Copy link
Collaborator

dixyes commented Jun 16, 2022

The workflow version does not support any compression, try https://github.com/dixyes/lwmbs/actions/runs/2507973225 (linux) or https://github.com/dixyes/lwmbs/actions/runs/2507973226 (mac)

If they donot work, maybe it's a bug, please provide step to reproduce, and let me try to fix it.

@theofidry
Copy link

For the record I would be very interested in being able to make it work with PHARs: box-project/box#331

@dixyes
Copy link
Collaborator

dixyes commented Jan 19, 2023

@theofidry

micro do support phar (this issue is due to compression and a missing phar patch which make sfx built in project workflow donot support it)

For laravel, laravel hardcoded many tests against sapi name to match "cli", micro may not work because of this.

To workaround this, micro can make itself pretend to be "cli"

lwmbs have a workflow for this usage:

https://github.com/dixyes/lwmbs/actions/runs/3945754818

(choose "micro-cli" versions of micro sfx, it have fake sapi name of "cli" and added many phar compression supports)

@theofidry
Copy link

Oh cool, ok I will have to give it another go then!

@jorbascrumps
Copy link

@ryangjchandler Did you ever sort this out? I'm currently getting internal corruption of phar "app.phar" (truncated manifest header). I'm also using Box (via laravel-zero) and then cat micro.sfx app > app.phar.

I've tried disabling Box's compression as well as the builds provided by @dixyes but the links are broken/ expired now.

@dixyes
Copy link
Collaborator

dixyes commented May 29, 2024

@ryangjchandler Did you ever sort this out? I'm currently getting internal corruption of phar "app.phar" (truncated manifest header). I'm also using Box (via laravel-zero) and then cat micro.sfx app > app.phar.

I've tried disabling Box's compression as well as the builds provided by @dixyes but the links are broken/ expired now.

You may get a binary from lwmbs workflow runs https://github.com/dixyes/lwmbs/actions/ (select any latest workflow run for you OS, then choose variants with name "micro-cli") or static-php https://github.com/crazywhalecc/static-php-cli

My Github notification broken for months, sorry for late reply

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

No branches or pull requests

4 participants