Skip to content

Why is ext-soap-engine required? #432

Closed

Description

@rimas-kudelis
Q A
Version 2.2.0

Support Question

As I understand it, php-soap/ext-soap-engine is a concrete implementation of interfaces and contracts defined in php-soap/engine. So my question is: why does this package require both of them? Doesn't this nullify the point of abstracting out interfaces and contracts in the first place?

Activity

  1. veewee commented on May 17, 2022

    @veewee
    Contributor

    Hello there,
    Good question!

    This package is an oppinionated implementation of soap presets that have proven to work for us.
    Where the php-soap organisation is a set of packages that you can use in order to build a SOAP client implementation from scratch.

    The main reason for including the ext-soap-engine is that we currently don't have any other working implementation of the engine. Once we have one, we can make the implementation opt-in or choose the best one as a default preset.
    Adding a PHP based engine instead of using ext-soap is on the roadmap - if we can find time for it some day :)

    However : It's not because we include it by default, that you have to use that specific implementation.

  2. rimas-kudelis commented on May 17, 2022

    @rimas-kudelis
    ContributorAuthor

    Wouldn't it make more sense for ext-soap-engine to "provides" an abstract php-soap/engine-implementation (or similar) package, and for phpro/soap-client to require that instead? It would allow for third-party implementations you might not even be aware of.

    I was actually quite surprised that soap-client now indirectly requires ext-soap. This wasn't the case with 1.7, but you specifically disallow using 1.7 with PHP8.1 now, so, in a way, I'm being forced to choose between a PHP downgrade and an extension.

    Is the rationale for these choices laid out anywhere? :)

  3. veewee commented on May 17, 2022

    @veewee
    Contributor

    You can read about it more here:
    https://github.com/phpro/soap-client/blob/v2.0.0/UPGRADING.md

    Basically the codebase of 1.7 got split up into a separate organisation, which is php-soap.
    This organisation contains the core building blocks for creating your own SOAP client implementation.
    The 1.7 version of this package did have the flexible engine logic and therefore didn't require ext-soap - which is basically a lie. Splitting that repo up into separate repo's made it easier to maintain the dependency graph per what component you want to use.
    So in the old version, you might got the false impression that you didnt need ext-soap, but trust me you did need it!
    In short : You never had a choice of not having ext-soap in 1.7 either.

    Adding a provides would indeed make sense for the ext-soap-engine. Feel free to do so.
    As mentioned before, this is a very oppinionated implementation that aims to give you sensible defaults so that you don't receive too many strange erors (of which we have had plenty!).
    Therefore we created a DefaultEngineFactory that trusts the ext-soap-engine and the psr-18 implementation to be there.
    See:
    https://github.com/phpro/soap-client/blob/master/src/Phpro/SoapClient/Soap/DefaultEngineFactory.php
    That is why we cannot drop the dependency in this package.

    It would allow for third-party implementations you might not even be aware of.

    It is possible, but I know how much work it would be to implement this.
    I'dd rather co-work out something we can all manage and fine-tune
    Life is too short to make too many SOAP engines ;)

  4. rimas-kudelis commented on May 17, 2022

    @rimas-kudelis
    ContributorAuthor

    Hm, thanks for your patient explanations!
    Feel free to convert this issue to a discussion – that seems more appropriate.

  5. locked and limited conversation to collaborators on May 17, 2022
  6. converted this issue into a discussion #433 on May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions