Ricorocks-Digital-Agency / Soap

A Laravel SOAP client that provides a clean interface for handling requests and responses.
MIT License
406 stars 33 forks source link

RFC: Replace SoapClient with ext-soap-engine #35

Open veewee opened 3 years ago

veewee commented 3 years ago

Hello There,

Would you consider merging a PR which includes https://github.com/php-soap/ext-soap-engine as a replacement for using PHP's SoapClient directly?

Some context: I am the author of phpro/soap-client. We recently created the php-soap organisation, which contains an extraction of the low-level structure of our own soap-client package. The packages inside the php-soap organisation can be used completely stand-alone and provide well-proven structures around PHP's SoapClient in order to make it as flexible as possible.

What's in it for this package:

I'm not a laravel expert, but looking at the code - it should not be to hard to include the basics. At first sight, including the package would especially affect these lines:

https://github.com/Ricorocks-Digital-Agency/Soap/blob/b0e5ef25515a36661d59e4df7c2cffd23edd6782/src/Request/SoapClientRequest.php#L80-L88

If you are willing to accept a PR, I am willing to try introducing the basics into this package.

lukeraymonddowning commented 3 years ago

Hi @veewee

That sounds really cool! Is it possible to conform to the request interface? If so, we could ship both and allow users to choose 👀

veewee commented 3 years ago

How would you make the request interface conform? Maybe I don't fully understand your question :)

My first idea was to keep this library completely like it is and use the ext-soap-engine to do the hard work internally instead of the SoapClient. Meaning that the way that your users configure soap remains exactly like it is. Since the options array is available during constructClient, we have all the information we'dd need to do this.

nedwors commented 10 months ago

Hi @veewee

First of all, thank you for offering advice and help in this project across issues 💪

It's, let's say, been a while since this was first discussed.

Where do we stand right now for bringing in the engine as you said?

We aim to bring up to a new v2 soon, (dropping old dependencies, new tooling etc) and we could aim to go into v2, or v3.

Do you have the capacity to bring #36 up to date once these updates go into the main branch?

veewee commented 10 months ago

Hi @nedwors,

No problem 😄

Where do we stand right now for bringing in the engine as you said?

That's up to you. This issue and the demo provided in #36 is still very relevant. I didn't go further than delivering the demo PR because there are many implementation details to be made in this package, as you can read in the comments inside that PR.

Do you have the capacity to bring https://github.com/Ricorocks-Digital-Agency/Soap/pull/36 up to date once these updates go into the main branch?

Currently a bit limited in time here. Getting the PR up to date might not be a problem. But since it's a demo of what the possibilities are, it won't be fully mergeable afterwards either. It might make more sense from the people maintaining this repository to figure out what the possibilities are and to decide how it will be implemented here. The PR contains a lot of comments with detailed information. I can imagine some of them are confusing or unkown - but I can always try to explain the things that are not clear to you or to point you in the right direction.

Would this be something that could work for you?