php-soap/engine
A modern SOAP engine for PHP, offering a robust foundation for building SOAP clients and servers with WSDL handling, type mapping, and reliable interoperability for enterprise and legacy web services.
Architecture fit
php-soap/engine is a framework-agnostic core with three clean seams that map well onto how a Laravel application is already structured:
guzzlehttp/guzzle, which implements Psr\Http\Client\ClientInterface. This means the engine can ride on the same Guzzle stack the app uses for HTTP, inheriting Laravel's HTTP client middleware, timeouts, retries, and logging rather than introducing a second outbound HTTP path.The trade-off versus ext-soap is that this is a pure-PHP reimplementation. That is the entire value proposition (testability, middleware, typed calls, no C-extension surprises) and also the entire risk surface (WSDL edge cases that ext-soap tolerates).
Integration feasibility
Feasible with modest effort. Expected pieces:
composer require php-soap/engine plus the PSR-18 transport adapter and a PSR-18 client (Guzzle).cached-engine companion or Laravel's cache repository). This is not optional at production scale.No Laravel-specific package appears to exist from the maintainers, so the integration glue is ours to own. That is ~1–2 days of work per external service including tests, not a platform project.
Technical risk
| Risk | Severity | Mitigation |
|---|---|---|
| Low adoption signal (27 stars; repo metadata incomplete) | High | Treat as a build-vs-buy bet; isolate behind an internal interface so it is replaceable |
| WSDL incompatibility vs enterprise quirks | Medium-High | PoC against every real WSDL in scope before committing; keep ext-soap fallback path |
| WSDL parse cost per request | Medium | Mandatory caching; measure cold/warm boot in PoC |
| Schema drift from providers | Medium | Contract tests against WSDL snapshot in CI |
| Bus factor / maintenance continuity | Medium | MIT + framework-agnostic means forkable; budget an internal owner |
| Feature gaps (MTOM/attachments, advanced WS-Security/WSU timestamps) | Medium | Enumerate required WS-* features up front; verify support |
Key questions
ext-soap for any service?Stack fit
Good. The package sits below the application layer and above Guzzle, touching none of Laravel's request lifecycle, container, or ORM. Recommended shape:
config/soap.php — per-service WSDL path, endpoint per environment, timeout, cache store, cache TTL.App\Soap\Contracts\{Service}Gateway — one interface per external service, expressed in domain terms.App\Soap\{Service}Client — adapter that depends on the engine client, translates domain DTOs to SOAP requests and faults to domain exceptions.SoapServiceProvider — builds engines as singletons, wires the PSR-18 transport to Guzzle/Laravel HTTP client.ext-soap mocking pain.Putting the interface boundary in place from day one is the single highest-leverage TPM decision here, because it converts a package-adoption risk into an implementation-detail risk.
Migration path
ext-soap clients untouched until the abstraction has proven itself.Compatibility
Verify explicitly: minimum PHP version vs the Laravel version in use, PSR-7/17/18 implementation versions, and Guzzle major-version alignment. Pin minor versions and let Renovate/Dependabot surface upgrades rather than floating ranges.
Sequencing
Do not migrate everything at once. The abstraction layer first, one service end-to-end second, breadth last. If the package fails the PoC, the abstraction survives and the implementation is swapped — this is the whole point of the sequencing.
Maintenance
Pin to a specific minor; upgrade deliberately with the contract-test suite as the safety net. Because the library is MIT and framework-agnostic, the maintenance ceiling is "fork and patch" — acceptable. Budget a named internal owner and a recurring review of upstream activity. The low star count is not disqualifying (the ecosystem is split across several repos), but it does mean the project cannot be relied on to absorb its own bugs on a schedule.
Support
No vendor SLA. Support is GitHub issues plus our own engineers. For a TPM this means the team must be capable of reading SOAP envelopes and WSDL XML — not just calling a method and hoping. Plan for at least one engineer to become the internal SOAP subject-matter expert.
Scaling
Favorable. The engine is stateless and per-request; horizontal scaling is not a concern. Two real scaling constraints:
Outbound concurrency is bounded by the Guzzle transport, so connection reuse and pool tuning live where the team already knows how to tune them.
Failure modes
Ramp-up
Moderate. The PSR-18/PSR-7 model is familiar to most Laravel engineers, but SOAP itself is not — expect time spent on WSDL reading, namespace handling, and fault taxonomy. Realistic estimate: one engineer productive in a week, team-productive in three to four weeks, with the abstraction layer and test harness doing most of the de-risking. Budget for a short internal knowledge-share on debugging SOAP envelopes, because that is where incidents will be won or lost.
How can I help you explore Laravel packages today?