PHPackages                             php-soap/engine - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. php-soap/engine

ActiveLibrary

php-soap/engine
===============

SOAP engine design

2.20.0(1mo ago)273.4M↓10.1%412MITPHPPHP ~8.4.0 || ~8.5.0CI passing

Since Jul 7Pushed 2mo ago3 watchersCompare

[ Source](https://github.com/php-soap/engine)[ Packagist](https://packagist.org/packages/php-soap/engine)[ Fund](https://opencollective.com/php-soap)[ RSS](/packages/php-soap-engine/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (21)Versions (28)Used By (12)

SOAP Engine
===========

[](#soap-engine)

This package contains the contracts and models that allow you to create a customizable SOAP engine. The design looks like this:

[![Engine](docs/engine.png)](docs/engine.png)

- **Driver:** A driver is a combination of an encoder + decoder + metadata that can work together in order to process SOAP requests.
    - **Encoder:** Can encode mixed data into a valid SOAP Request.
    - **Decoder:** Can decode a SOAP Response into a mixed data result.
    - **Metadata:** Processes the WSDL and returns a collection of available types and methods.
- **Transport:** Sends the HTTP SOAP Request and receives the HTTP SOAP Response.

Every component above can be used seperately in order to create your own customized SOAP Engine.

Want to help out? 💚
===================

[](#want-to-help-out-)

- [Become a Sponsor](https://github.com/php-soap/.github/blob/main/HELPING_OUT.md#sponsor)
- [Let us do your implementation](https://github.com/php-soap/.github/blob/main/HELPING_OUT.md#let-us-do-your-implementation)
- [Contribute](https://github.com/php-soap/.github/blob/main/HELPING_OUT.md#contribute)
- [Help maintain these packages](https://github.com/php-soap/.github/blob/main/HELPING_OUT.md#maintain)

Want more information about the future of this project? Check out this list of the [next big projects](https://github.com/php-soap/.github/blob/main/PROJECTS.md) we'll be working on.

Installation
============

[](#installation)

```
composer install php-soap/engine
```

Engines
-------

[](#engines)

This package provides engines that can be used in a generic way:

### SimpleEngine

[](#simpleengine)

The SimpleEngine is a wrapper around a previous defined `Driver` and a `Transport` implementation.

```
use Soap\Engine\SimpleEngine;

$engine = new SimpleEngine($driver,$transport);
```

### LazyEngine

[](#lazyengine)

You don't want to be loading WSDL files or SOAP services if you don't need to. By wrapping an engine in a lazy engine, you can prevent any WSDL loading from happening before actually requesting a resource.

```
use Soap\Engine\SimpleEngine;
use Soap\Engine\LazyEngine;

$engine = new LazyEngine(fn () => new SimpleEngine($driver, $transport));
```

Drivers
-------

[](#drivers)

This package provides drivers that can be used in a generic way:

### SimpleDriver

[](#simpledriver)

The SimpleEngine is a wrapper around a previous defined `Encoder`, `Decoder` and a `Metadata` implementation.

```
use Soap\Engine\SimpleDriver;

$engine = new SimpleDriver($encoder, $decoder, $metadata);
```

### PartialDriver

[](#partialdriver)

The PartialDriver is a wrapper around a previous defined `Encoder`, `Decoder` and a `Metadata` implementation. It is possible to only provide one of the required items. When some of the implementations are missing, it will throw a `DriverException` when the driver's method is invoked.

```
use Soap\Engine\PartialDriver;

$engine = new PartialDriver(metadata: $metadata);
```

List of available components:
-----------------------------

[](#list-of-available-components)

- [cached-engine](https://github.com/php-soap/cached-engine/): Provides wrappers for storing engines and encoders in a PSR-6 Cache pool.

    - **CachedDriver**: Decorates a cache around a driver factory.
    - **CachedEngine**: Decorates a cache around an engine factory.
- [ext-soap-engine](https://github.com/php-soap/ext-soap-engine): An engine based on PHP's ext-soap.

    - **ExtSoapEncoder:** Uses PHP's `SoapClient` in order to encode a mixed request body into a SOAP request.
    - **ExtSoapDecoder:** Uses PHP's `SoapClient` in order to decode a SOAP Response into mixed data.
    - **ExtSoapMetadata:** Parses the methods and types from PHP's `SoapClient` into something more usable.
    - **ExtSoapDriver:** Combines the ext-soap encoder, decoder and metadata tools into a usable `ext-soap` preset.
    - **ExtSoapClientTransport:** Uses PHP's `SoapClient` to handle SOAP requests.
    - **ExtSoapServerTransport:** Uses PHP's `SoapServer` to handle SOAP requests.
    - **TraceableTransport:** Can be used to decorate another transport and keeps track of the last request and response.
- [psr18-transport](https://github.com/php-soap/psr18-transport/): Leverages your PSR-18 HTTP client to deal with the HTTP Layer.

    - **Psr18Transport**: Uses a PSR-18 HTTP client to handle SOAP requests. You can also use fiber-based Async clients!
    - Provides middleware to deal with some common SOAP quirks.
- [wsdl-reader](https://github.com/php-soap/wsdl-reader/): Provides an XML based PHP implementation for collecting WSDL meta-data.

    - **Wsdl1MetadataProvider**: Provides the methods and types from any WSDL 1 document.
- [encoding](https://github.com/php-soap/encoding): Provides a pure PHP drop-in replacement for the ext-soap encoding logic.

    - **Driver**: Combines the encoder, decoder and wsdl-reader metadata into a usable vanilla PHP preset.
    - **Encoder**: Encodes mixed data into a valid SOAP Request.
    - **Decoder**: Decodes a SOAP Response into mixed data.

Creating your own engine
------------------------

[](#creating-your-own-engine)

Every component of the engine has its own interface. You can choose to build an entire engine or a specific component. The interfaces look like this:

- [Decoder](src/Decoder.php)
- [Driver](src/Driver.php)
- [Encoder](src/Encoder.php)
- [Engine](src/Engine.php)
- [Transport](src/Transport.php)

### Testing your engine

[](#testing-your-engine)

To make sure that all components have the same end-result, we provide [a set of integration tests](https://github.com/php-soap/engine-integration-tests) that can be used to test your custom components.

Usage:

```
composer require --dev php-soap/engine-integration-tests

```

This will make following test cases available:

- [AbstractDecoderTest](https://github.com/php-soap/engine-integration-tests/tree/main/src/AbstractDecoderTest.php): Can be used to test a custom `Decoder`.
- [AbstractEncoderTest](https://github.com/php-soap/engine-integration-tests/tree/main/src/AbstractEncoderTest.php): Can be used to test a custom `Encoder`.
- [AbstractEngineTest](https://github.com/php-soap/engine-integration-tests/tree/main/src/AbstractEngineTest.php): : Can be used to test a custom `Engine` or `Transport`.
- [AbstractMetadataProviderTest](https://github.com/php-soap/engine-integration-tests/tree/main/src/AbstractMetadataProviderTest.php): : Can be used to test a custom `Metadata` or `MetadataProvider`.

###  Health Score

65

—

FairBetter than 99% of packages

Maintenance89

Actively maintained with recent releases

Popularity53

Moderate usage in the ecosystem

Community24

Small or concentrated contributor base

Maturity79

Established project with proven stability

 Bus Factor1

Top contributor holds 98.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~66 days

Recently: every ~39 days

Total

27

Last Release

53d ago

Major Versions

v0.1.0 → v1.0.02021-07-14

v1.3.0 → 2.0.02023-03-31

PHP version history (6 changes)v0.1.0PHP ^8.0

v1.3.0PHP ~8.1.0 || ~8.2.0

2.5.0PHP ~8.1.0 || ~8.2.0 || ~8.3.0

2.13.0PHP ~8.2.0 || ~8.3.0 || ~8.4.0

2.16.0PHP ~8.3.0 || ~8.4.0 || ~8.5.0

2.20.0PHP ~8.4.0 || ~8.5.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/c0cb7e57de4834c7e94552864acb7c5640725b5ec0ea8f087ebbf6761dd3c206?d=identicon)[veewee](/maintainers/veewee)

---

Top Contributors

[![veewee](https://avatars.githubusercontent.com/u/1618158?v=4)](https://github.com/veewee "veewee (67 commits)")[![EJTJ3](https://avatars.githubusercontent.com/u/31619091?v=4)](https://github.com/EJTJ3 "EJTJ3 (1 commits)")

---

Tags

hacktoberfest

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/php-soap-engine/health.svg)

```
[![Health](https://phpackages.com/badges/php-soap-engine/health.svg)](https://phpackages.com/packages/php-soap-engine)
```

###  Alternatives

[veewee/xml

XML without worries

1835.9M29](/packages/veewee-xml)[phpro/soap-client

A general purpose SoapClient library

8885.6M46](/packages/phpro-soap-client)[php-soap/wsdl

Deals with WSDLs

173.5M12](/packages/php-soap-wsdl)[php-soap/wsdl-reader

A WSDL reader in PHP

212.3M9](/packages/php-soap-wsdl-reader)[roave/backward-compatibility-check

Tool to compare two revisions of a public API to check for BC breaks

5953.3M56](/packages/roave-backward-compatibility-check)[maglnet/composer-require-checker

CLI tool to analyze composer dependencies and verify that no unknown symbols are used in the sources of a package

99810.9M671](/packages/maglnet-composer-require-checker)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
