Open WilliamBlais opened 3 years ago
Hi, thanks for question. I think I can install PHP during build time. But it requires little research. I hope it wouldn't be slower.
@f3l1x thanks for the quick answer! Do you think it would be a good solution to modify getPhpFiles() in utils.ts to to download the file directly from npm and unzip it? Sounds possible?
Something like this; curl https://registry.npmjs.org/PACKAGE-NAME/ \ | jq '.versions[."dist-tags".latest].dist.tarball'
I was using on-the-fly installation in early versions of vercel-php. It was harder to maintain it. What is your motivation to install custom PHP library?
Question
Hi, I would like to build a custom PHP library using https://github.com/juicyfx/libphp/tree/master/libs/amazon-linux-2-v80. However, Vercel-php assumes we're using @libphp/amazon-linux-2-v80. Would it be possible to make that a setting? Would it be possible to remove @libphp/amazon-linux-2-v80 from package.json and download it at build time instead?
Maybe I could create a script that lets you choose which PHP extension you want, build it and publish it to NPM. Then the user would be able to use his own custom library.
Thanks!