WordPress/wordpress-playground

PHP SoapClient extension

Closed this issue · 9 comments

Hi! Is there a way to install some PHP extensions? I'm particularly interested in the SoapClient extension - the VIES composer PHP library I use for one of my plugins uses it, and without enabling it, I cannot add the blueprint to the plugin.

Thanks!
Karolina

@vyskoczilova that extension isn't supported yet. Perhaps it wouldn't be difficult to add? It seems like building PHP with --enable-soap and libxml is all it takes.

I'm not sure when we'll be able to prioritize it, but I added it to the project board. If you'd like to take a stab at this then PHP is built using:

  • Dockerfile
  • build.js
  • npm run recompile:php:web command, or npm run recompile:php:web:kitchen-sink:8.0 to rebuild just the 8.0 release.

Also looping in @mho22 – do you have any spare cycles to take a look?

Hi @adamziel, I was on vacation. However, I tried to modify the code (after all, I would just simply enable the soap in libxml configuration like this: vyskoczilova@3c1fdb5), but I'm not able to run the build. It freezes on my computer (and I've spent quite some time installing docker buildx), so I gave up after half an hour. But I guess it should work.

Sorry, I couldn't help more :(

Hi @adamziel is there any progress on this? I've tried to contribute it myself; however, I wasn't able to build the code (see the message above). Thanks for any feedback!

I've tried to contribute it myself; however, I wasn't able to build the code (see the message above). Thanks for any feedback!

I know it's been a while but what errors did you get?

I was able to rebuild PHP with Soap, but wasn't able to test if it's working.

You can see my attempt in this PR.

@vyskoczilova would you have time to take a look at that PR? I'm not sure when I will be able to get back to it, but I'm happy to help you with any questions or issues.

@bgrgicak My computer just got frozen in the build with no errors, but I can have another look at your PR (but from what I see there now, I'm not convinced I could help with that since all the errors you're getting are far behind my expertise).

My computer just got frozen in the build with no errors

@vyskoczilova Would you mind sharing the OS that you are using? These builds can take long, especially if you are using a slower machine.

but from what I see there now, I'm not convinced I could help with that since all the errors you're getting are far behind my expertise

Thank you for taking a look! Dealing with these Asyncify issues isn't easy, I struggle with it every time, so it's completely understandable.

@adamziel I just noticed that in Playground, WooCommerce shows this error Your server does not have the [SoapClient](https://php.net/manual/en/class.soapclient.php) class enabled - some gateway plugins which use SOAP may not work as expected..

Yeah, that's the very same reason I wanted to add the extension. Some older providers use just Soap, which is fortunately normally part of the installation.