crazywhalecc / static-php-cli

Build standalone PHP binary on Linux, macOS, FreeBSD, Windows, with PHP project together, with popular extensions included.
https://static-php.dev
MIT License
1.25k stars 216 forks source link

Support more extensions #152

Open crazywhalecc opened 1 year ago

crazywhalecc commented 1 year ago

Some extensions that are planned to be supported are listed here. Here is just a collection list and contains my notes, and there is no guarantee that the extension will be supported. Some of the extensions contained here may not be supported and will be removed from this list if they are found to be unsupported.

Linux & macOS

Windows

FreeBSD

No.

Since FreeBSD lacks CI support on GitHub and it is troublesome to test on my own computer, I will temporarily put the update of FreeBSD on hold.

If someone can provide FreeBSD CI or answer questions related to FreeBSD compilation, I will be very grateful and restart the official maintenance of FreeBSD.

stloyd commented 1 year ago

Aren't those extensions already covered?

crazywhalecc commented 1 year ago

Aren't those extensions already covered?

No. imap and ldap are internal extensions, and they will be supported in the future (I'm debugging them on my local branch). Now I need to figure out some old library compilation, e.g. wu-imap (c-client). It would be great if someone knows about them and would like to help.

For imap, I'm reading Homebrew and Alpine BUILD related code:

DubbleClick commented 1 year ago

I think the old links that are mentioned in git.alpinelinux.org are dead, but the sources can be found at https://github.com/uw-imap/imap. Edit: never mind, the source link is still up.

I'll try to get the php-imap compilation working on a VM, but this looks like a dead extension going forward. Highly unfortunate that there doesn't seem to be a reliable alternative.

Ldap (and sysvsem, is it planned?) integration appears fairly straightforward, though.

crazywhalecc commented 1 year ago

@DubbleClick sysvsem is supported now, but it seems I forgot add it in documentation. I'll add it later.

ldap is planned but I haven't started yet.

DubbleClick commented 1 year ago

I was able to compile php with ldap just following the documentation. Imap is a whole other story, had no luck with it on rhel 9.2. I hope I'll find the time to create a PR for ldap next week.

crazywhalecc commented 1 year ago

I was able to compile php with ldap just following the documentation. Imap is a whole other story, had no luck with it on rhel 9.2. I hope I'll find the time to create a PR for ldap next week.

It would be great if you could improve new extensions!

And I noticed that you are using RHEL, I'm not familiar with it. It might be more helpful if someone could first improve the doctor check items for RHEL and CentOS environments.

DubbleClick commented 1 year ago

Yeah I've noticed that there was no musl auto-fix for rhel available. I wasn't able to find a rpm for it and therefore had to manually build it and add the directory to ld_flags.

Will do again with a fresh VM and document the necessary commands. I should find time next week.

DubbleClick commented 12 months ago

I've had more of a play with imap and got it to compile (dynamically so far, with openssl3, not 1.1.1), but even that requires a lot of patches both in the form of .patch files as well as replacing contents in files that no .patch file is available for. This project doesn't have any logic to apply patch files yet.

It also needs multiple services to be running on the system and a (self signed is fine) certificate. It's a complete mess that requires decisions to be taken to integrate it here that I'm not in a position to make.

I would very much appreciate if someone could tackle it, because it's a very necessary extension with no real replacement (there's laminas mail to send mail with limited functionality, an abandoned php-imap2 that doesn't work with php 8, and nothing else). But you should expect it to be quite a lot of work. :/

Edit: There seems to be a fairly well maintained imap replacement here, although I haven't check if all functionality exists: https://github.com/Webklex/php-imap

Either way it would still be good to integrate ext-imap for compatibility with existing projects.

crazywhalecc commented 12 months ago

@DubbleClick

See #202

boonkerz commented 6 months ago

i work on sdl

cli and micro with static sdl3 lib currently only on windows

image
jorgeluiz1586 commented 2 months ago

Hello, could you include the Openswoole extension to be tested and included?

I saw that there is Swoole but I need the gRPC client and gRPC server of Openswoole, I believe it is compatible since Openswoole is a fork of Swoole with more features.

crazywhalecc commented 2 months ago

@jorgeluiz1586 It should not be difficult to support openswoole.

But I am not sure if openswoole has a similar hook bug as swoole (phpmicro+phar cannot be used in PROCESS mode).

weijer commented 1 week ago

Need to support :msgpack

crazywhalecc commented 1 week ago

@weijer Please create an issue and we can start this with progress.