NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #1929 most downloaded on Packagist
A general purpose SoapClient library
Latest stable
6.2.0
Last release 5 months ago
29 May 2026
Release timing varies
gaps range from 2 weeks to 7 months
Nearly every release is documented
notes for 59 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
92 releases · first in 2015
Drag across the ruler to compare, or tap a release to open it.
Sync console application version & add release Makefile by @veewee in https://github.com/phpro/soap-client/pull/612
Full Changelog: https://github.com/phpro/soap-client/compare/6.1.0...6.2.0
GenConfigCommand - print wsdl loading exceptions when output is verbose by @YasserB94 in https://github.com/phpro/soap-client/pull/610
Full Changelog: https://github.com/phpro/soap-client/compare/6.0.0...6.0.1
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Full Changelog: 6.0.0...6.0.1
PHP 8.4 is now the minimum required version (PHP 8.3 support dropped)
php-standard-library/php-standard-library with standalone packages (^6.1)| Package | v5 | v6 |
|---|---|---|
| php | ~8.3.0 || ~8.4.0 || ~8.5.0 | ~8.4.0 || ~8.5.0 |
| php-standard-library | monolithic ^3-6 | standalone packages ^6.1 |
| php-soap/cached-engine | ~0.6 | ~0.8 |
| php-soap/encoding | ~0.28 | ~0.32 |
| php-soap/engine | ^2.19 | ^2.20 |
| php-soap/psr18-transport | ^1.7 | ^2.0 |
| php-soap/wsdl-reader | ~0.31 | ~0.32 |
PHP 8.3 is no longer supported. Upgrade to PHP 8.4+ before updating.
The biggest user-facing change. All DOM types migrated to PHP 8.4's modern DOM API:
DOMDocument -> Dom\XMLDocumentDOMElement -> Dom\ElementDOMNode -> Dom\NodeIf you wrote custom middleware or manipulators that touch DOM objects, you need to update:
// Before (v5):
use Soap\Psr18Transport\Xml\XmlMessageManipulator;
$manipulator = new XmlMessageManipulator(function (\DOMDocument $dom): void {
// ...
});
// After (v6):
$manipulator = new XmlMessageManipulator(function (\Dom\XMLDocument $dom): void {
// ...
});
// Before (v5):
$middleware = new SoapHeaderMiddleware(fn(\DOMNode $node): \DOMElement => /* ... */);
// After (v6):
$middleware = new SoapHeaderMiddleware(fn(\Dom\Node $node): \Dom\Element => /* ... */);
Element::fromDOMElement() and Element::element() now accept/return Dom\Element instead of DOMElementDom\ namespace equivalentsnull for missing values (previously empty strings)The monolithic php-standard-library/php-standard-library has been replaced with standalone packages:
php-standard-library/dict
php-standard-library/foundation
php-standard-library/iter
php-standard-library/option
php-standard-library/result
php-standard-library/str
php-standard-library/type
php-standard-library/vec
This should not affect end users unless you depend on PSL classes being available transitively.
composer.json: composer require phpro/soap-client:^6.0DOMDocument, DOMElement, DOMNode usage in SOAP middleware/manipulators and migrate to Dom\XMLDocument, Dom\Element, Dom\NodeElement::fromDOMElement() callsFull Changelog: https://github.com/phpro/soap-client/compare/5.0.0...6.0.0
V5 overhauls the code generation configuration system with proper value objects, introduces XML namespace-aware type mapping, customizable coding stan
V5 overhauls the code generation configuration system with proper value objects, introduces XML namespace-aware type mapping, customizable coding standards, and improved default value handling for generated code.
composer require 'phpro/soap-client:^5.0.0-beta1@beta' --update-with-dependencies
You'll need to update your code generation configuration file. For a step-by-step plan, you can follow the instructions at:
https://github.com/phpro/soap-client/blob/v5.x/UPGRADING.md#v4-to-v5
The Config class no longer uses individual string setters. Instead, dedicated value objects — Destination, ClientConfig, ClassMapConfig, and TypeNamespaceMap — replace the old setTypeNamespace(), setTypeDestination(), setClientName(), etc. methods. The ConfigInterface has been removed.
A new TypeNamespaceMap allows you to map XML namespaces (xmlns) to specific PHP namespace destinations. This is useful when a WSDL defines types across multiple XML namespaces and you want to organize them into separate directories.
You can use explicit withMapping() calls, a built-in PrefixBasedTypeNamespaceStrategy for automatic resolution, or combine both. The generate:config command now detects xmlns namespaces from your WSDL and suggests mappings in the generated config.
Duplicate type strategies (IntersectDuplicateTypesStrategy and RemoveDuplicateTypesStrategy) are now namespace-aware — types that map to different PHP namespaces are no longer considered duplicates.
A new CodingStandardsStrategyInterface lets you customize naming conventions for all generated code. By default, DefaultCodingStandardsStrategy is used, which matches existing behavior — no changes required for existing users.
Configure it via Config::setCodingStandards(). Context classes (TypeContext, PropertyContext, ClientMethodContext, ClassMapContext) now require CodeGeneratorContext as an additional constructor parameter. Property gains new convenience methods methodName() and parameterName() that use the configured coding standards.
The old PropertyDefaultsAssembler has been removed. Its functionality is now built into PropertyAssembler and ConstructorAssembler via a new DefaultValuesStrategy enum:
OptionalOnly (new default) — Only nullable/optional properties get = nullAll (previous default) — All scalars get zero-value defaultsNone — No defaults appliedFull Changelog: https://github.com/phpro/soap-client/compare/4.6.0...5.0.0
feat: add support for azjezz/psl@5.0 by @EJTJ3 in https://github.com/phpro/soap-client/pull/603
Full Changelog: https://github.com/phpro/soap-client/compare/5.0.0-beta1...5.0.0-beta2
V5 overhauls the code generation configuration system with proper value objects, introduces XML namespace-aware type mapping, customizable coding stan
V5 overhauls the code generation configuration system with proper value objects, introduces XML namespace-aware type mapping, customizable coding standards, and improved default value handling for generated code.
We decided to pre-launch at this point in order to get some feedback from you. Feel free to play around with it and give us feedback!
composer require 'phpro/soap-client:^5.0.0-beta1@beta' --update-with-dependencies
You'll need to update your code generation configuration file. For a step-by-step plan, you can follow the instructions at:
https://github.com/phpro/soap-client/blob/v5.x/UPGRADING.md#v4-to-v5
The Config class no longer uses individual string setters. Instead, dedicated value objects — Destination, ClientConfig, ClassMapConfig, and TypeNamespaceMap — replace the old setTypeNamespace(), setTypeDestination(), setClientName(), etc. methods. The ConfigInterface has been removed.
A new TypeNamespaceMap allows you to map XML namespaces (xmlns) to specific PHP namespace destinations. This is useful when a WSDL defines types across multiple XML namespaces and you want to organize them into separate directories.
You can use explicit withMapping() calls, a built-in PrefixBasedTypeNamespaceStrategy for automatic resolution, or combine both. The generate:config command now detects xmlns namespaces from your WSDL and suggests mappings in the generated config.
Duplicate type strategies (IntersectDuplicateTypesStrategy and RemoveDuplicateTypesStrategy) are now namespace-aware — types that map to different PHP namespaces are no longer considered duplicates.
A new CodingStandardsStrategyInterface lets you customize naming conventions for all generated code. By default, DefaultCodingStandardsStrategy is used, which matches existing behavior — no changes required for existing users.
Configure it via Config::setCodingStandards(). Context classes (TypeContext, PropertyContext, ClientMethodContext, ClassMapContext) now require CodeGeneratorContext as an additional constructor parameter. Property gains new convenience methods methodName() and parameterName() that use the configured coding standards.
The old PropertyDefaultsAssembler has been removed. Its functionality is now built into PropertyAssembler and ConstructorAssembler via a new DefaultValuesStrategy enum:
OptionalOnly (new default) — Only nullable/optional properties get = nullAll (previous default) — All scalars get zero-value defaultsNone — No defaults appliedFull Changelog: https://github.com/phpro/soap-client/compare/4.6.0...5.0.0-beta1
feat: replace azjezz/psl with php-standard-library/php-standard-library by @veewee in https://github.com/phpro/soap-client/pull/606
Full Changelog: https://github.com/phpro/soap-client/compare/4.7.0...4.8.0
feat: add support for azjezz/psl@5.0 by @EJTJ3 in https://github.com/phpro/soap-client/pull/603
Full Changelog: https://github.com/phpro/soap-client/compare/4.6.0...4.7.0
feat: add support for symfony 8 by @EJTJ3 in https://github.com/phpro/soap-client/pull/600
Full Changelog: https://github.com/phpro/soap-client/compare/4.5.0...4.6.0
Update ClientConstructorAssembler to use type instead of phpdoc by @ayrtonandino in https://github.com/phpro/soap-client/pull/595
Full Changelog: https://github.com/phpro/soap-client/compare/4.4.1...4.5.0
Full Changelog: 4.4.1...4.5.0
Dont fall back to simple base-type for simple enums. by @veewee in https://github.com/phpro/soap-client/pull/593
Full Changelog: https://github.com/phpro/soap-client/compare/4.4.0...4.4.1
Fix xsd:language-like simple type generations. by @veewee in https://github.com/phpro/soap-client/pull/592
Full Changelog: https://github.com/phpro/soap-client/compare/4.3.0...4.4.0
Fix code example in the docs by @jdreesen in https://github.com/phpro/soap-client/pull/582
Full Changelog: https://github.com/phpro/soap-client/compare/4.2.0...4.3.0
Fix decimal enum key generation error by @veewee in https://github.com/phpro/soap-client/pull/575
Full Changelog: https://github.com/phpro/soap-client/compare/4.1.1...4.2.0
Full Changelog: https://github.com/phpro/soap-client/compare/4.1.0...4.1.1
Full Changelog: https://github.com/phpro/soap-client/compare/4.1.0...4.1.1
Mark non-intersecting types as nullable by @veewee in https://github.com/phpro/soap-client/pull/562
Full Changelog: https://github.com/phpro/soap-client/compare/4.0.0...4.1.0
Fix code generation deprecations by @veewee in https://github.com/phpro/soap-client/pull/528
This release adds support for long standing encoding issues. In order to solve these issues, this package uses a new encoding package.
Starting from this release, you don't need PHP's ext-soap anymore!
NOTE: We now require a psr/cache-implementation so that the engine (and WSDL parsing) can be cached. Some examples are: symfony/cache or cache/*-adapter.
If you don't have a cache implementation installed, you can for example run:
composer require symfony/cache
Next, you can upgrade the soap-client:
composer require 'phpro/soap-client:^4.0.0' --update-with-dependencies
Finally, You'll need to update some parts of your codebase. For a step-by-step plan, you can follow the instructions at:
https://github.com/phpro/soap-client/blob/v4.x/UPGRADING.md#v3-to-v4
This release was funded by the sponsorship of buhta.com.
<a href="https://buhta.com"><img src="https://raw.githubusercontent.com/php-soap/encoding/0.4.1/docs/buhta.svg" width="200" alt="buhta.com"></a>
Feel free to donate at sponsoring.
<any /> by @veewee in https://github.com/phpro/soap-client/pull/560Full Changelog: https://github.com/phpro/soap-client/compare/3.3.0...4.0.0
Generate backed enums from XSD by @veewee in https://github.com/phpro/soap-client/pull/561
Full Changelog: https://github.com/phpro/soap-client/compare/4.0.0-alpha4...4.0.0-alpha5
Add the ability to select specific services by port / service name by @veewee in https://github.com/phpro/soap-client/pull/558
<any /> by @veewee in https://github.com/phpro/soap-client/pull/560The configuration slightly changed in comparison to previous alpha:
EngineOptions::defaults($wsdl)
- ->withPreferredSoapVersion(SoapVersion::SOAP_12)
+ ->withWsdlServiceSelectionCriteria(
+ ServiceSelectionCriteria::defaults()
+ ->withPreferredSoapVersion(SoapVersion::SOAP_12)
+ );
Full Changelog: https://github.com/phpro/soap-client/compare/4.0.0-alpha3...4.0.0-alpha4
Rework code generator models for easier 3rd-party class type encoders by @veewee in https://github.com/phpro/soap-client/pull/552
Full Changelog: https://github.com/phpro/soap-client/compare/4.0.0-alpha2...4.0.0-alpha3
Fix code generation deprecations by @veewee in https://github.com/phpro/soap-client/pull/528
Full Changelog: https://github.com/phpro/soap-client/compare/4.0.0-alpha1...4.0.0-alpha2
It adds support for long standng encoding issues. Therefore, it uses a new encoding package.
It adds support for long standng encoding issues. Therefore, it uses a new encoding package.
We decided to pre-launch at this point in order to get some feedback from you. Feel free to play around with it and give us feedback!
NOTE: We now require a psr/cache-implementation so that the engine (and WSDL parsing) can be cached. Some examples are: symfony/cache or cache/*-adapter.
If you don't have a cache implementation installed, you can for example run:
composer require symfony/cache
Next, you can upgrade the soap-client:
composer require 'phpro/soap-client:^4.0.0-alpha1@alpha' --update-with-dependencies
Finally, You'll need to update some parts of your codebase. For a step-by-step plan, you can follow the instructions at:
https://github.com/phpro/soap-client/blob/v4.x/UPGRADING.md#v3-to-v4
Join the discussion and provide your feedback here!
This release was funded by the sponsorship of buhta.com.
<a href="https://buhta.com"><img src="https://raw.githubusercontent.com/php-soap/encoding/0.4.1/docs/buhta.svg" width="200" alt="buhta.com"></a>
Feel free to donate at sponsoring.
Full Changelog: https://github.com/phpro/soap-client/compare/3.3.0...4.0.0-alpha1
Add AnyURI fallback type to \Phpro\SoapClient\CodeGenerator\Util\Normalizer::$normalizations by @ademarco in https://github.com/phpro/soap-client/pull
Full Changelog: https://github.com/phpro/soap-client/compare/3.4.0...3.4.1
Bump dependencies v3 by @veewee in https://github.com/phpro/soap-client/pull/554
Full Changelog: https://github.com/phpro/soap-client/compare/3.3.0...3.4.0
Consider nullability for properties by @lstrojny in https://github.com/phpro/soap-client/pull/516
Full Changelog: https://github.com/phpro/soap-client/compare/3.2.0...3.3.0
Update loader in CodeGeneratorEngineFactory by @janvernieuwe in https://github.com/phpro/soap-client/pull/512
Full Changelog: https://github.com/phpro/soap-client/compare/3.1.2...3.2.0
Allow empty enums by @veewee in https://github.com/phpro/soap-client/pull/507
Full Changelog: https://github.com/phpro/soap-client/compare/3.1.1...3.1.2
Symfony 7 return types by @simoheinonen in https://github.com/phpro/soap-client/pull/494
Full Changelog: https://github.com/phpro/soap-client/compare/3.1.0...3.1.1
Allow PHP83 by @veewee in https://github.com/phpro/soap-client/pull/492
Full Changelog: https://github.com/phpro/soap-client/compare/3.0.0...3.1.0
In a time of static analyzers, we needed to step up our game and make the code generation as type-safe as possible! This release aims to provide a sol
In a time of static analyzers, we needed to step up our game and make the code generation as type-safe as possible! This release aims to provide a solution for all type-related issues you might have encountered in previous versions.
It provides improved support for:
This example generated type-class gives you an idea:
namespace OurSoapClient\Type;
use IteratorAggregate;
/**
* @phpstan-implements \IteratorAggregate<int<1,max>, \OurSoapClient\Type\Description>
* @psalm-implements \IteratorAggregate<int<1,max>, \OurSoapClient\Type\Description>
*/
class Descriptions implements IteratorAggregate
{
/**
* @var array<int<1,max>, \OurSoapClient\Type\Description>
*/
private array $Description;
/**
* @return \ArrayIterator|\OurSoapClient\Type\Description[]
* @phpstan-return \ArrayIterator<int<1,max>, \OurSoapClient\Type\Description>
* @psalm-return \ArrayIterator<int<1,max>, \OurSoapClient\Type\Description>
*/
public function getIterator() : \ArrayIterator
{
return new \ArrayIterator($this->Description);
}
}
The result of the generated code is fully understandable by your static analyzer tools !!!
composer require 'phpro/soap-client:^3.0.0' --update-with-dependencies
Upgrading is a matter of changing the engine for code generation in the code-generation configuration file:
use Phpro\SoapClient\Soap\CodeGeneratorEngineFactory;
use Soap\Wsdl\Loader\FlatteningLoader;
use Soap\Wsdl\Loader\StreamWrapperLoader;
return Config::create()
->setEngine($engine = CodeGeneratorEngineFactory::create(
'your.wsdl',
new FlatteningLoader(new StreamWrapperLoader()) // Or a PSR18-based loader ... :)
))
Note: You can still use the default engine, yet you won't get the information for the enhanced type generation.
Regenerate classes:
./vendor/bin/soap-client generate:client --config=config/soap-client.php
./vendor/bin/soap-client generate:classmap --config=config/soap-client.php
./vendor/bin/soap-client generate:types --config=config/soap-client.php
At the moment, we baked a bit more than 10% of the initial goal of this project. Meaning a lot of personal time went into the project. Just to give an idea: This release is massive and consists out about 2,5 years of periodically working on and off the new features. If you like what we did with the project, we appreciate any sponsorships. This way, we can make some more time for working on the next big encoder / decoder improvement project.
Full Changelog: https://github.com/phpro/soap-client/compare/2.4.0...3.0.0
It aims to add stricter and better types to the generated codebase. Therefore, it uses a new wsdl-reader package.
It aims to add stricter and better types to the generated codebase. Therefore, it uses a new wsdl-reader package.
We decided to pre-launch at this point in order to get some feedback from you. Feel free to play around with it and give us feedback!
But first, check out this awesomely types example output:
namespace OurSoapClient\Type;
use IteratorAggregate;
/**
* @phpstan-implements \IteratorAggregate<int<1,max>, \OurSoapClient\Type\Description>
* @psalm-implements \IteratorAggregate<int<1,max>, \OurSoapClient\Type\Description>
*/
class Descriptions implements IteratorAggregate
{
/**
* @var array<int<1,max>, \OurSoapClient\Type\Description>
*/
private array $Description;
/**
* @return \ArrayIterator|\OurSoapClient\Type\Description[]
* @phpstan-return \ArrayIterator<int<1,max>, \OurSoapClient\Type\Description>
* @psalm-return \ArrayIterator<int<1,max>, \OurSoapClient\Type\Description>
*/
public function getIterator() : \ArrayIterator
{
return new \ArrayIterator($this->Description);
}
}
composer require 'phpro/soap-client:^3.0.0-alpha1@alpha' --update-with-dependencies
Upgrading is a matter of changing the engine for code generation in the code-generation configuration file:
use Phpro\SoapClient\Soap\CodeGeneratorEngineFactory;
use Soap\Wsdl\Loader\FlatteningLoader;
use Soap\Wsdl\Loader\StreamWrapperLoader;
return Config::create()
->setEngine($engine = CodeGeneratorEngineFactory::create(
'your.wsdl',
new FlatteningLoader(new StreamWrapperLoader()) // Or a PSR18-based loader ... :)
))
You should be able to rebuild your types by removing the old files and regenerating them:
php ./vendor/bin/soap-client generate:client --config=config/xxxx.php
php ./vendor/bin/soap-client generate:classmap --config=config/xxxx.php
php ./vendor/bin/soap-client generate:types --config=config/xxxx.php
Join the discussion and provide your feedback here!
Can it parse your WSDL?
ℹ️ You could use the wsdl-reader CLI tools to introspect all the information that is being read from your WSDL
How strict should we enforce the types by default?
We've configured the default settings to enforce strict types on all your properties, methods, ... You'dd expect the information from the SOAP server to match the WSDL signature, but this is not always true. This might make it annoying for new users of this package to overcome this kind of errors. so:
Any other feedback is welcome as well! Feel free to hop on the discussion!
There is still a lot of work we want to get done in order to get to a stable release. Check #464 for the complete roadmap.
At the moment, we only baked 5% of the development time of this project. Feel free to help out by sponsoring, so that we can make some more time for this.
Allow newer version of laminas/laminas-code by @lkck24 in https://github.com/phpro/soap-client/pull/476
Full Changelog: https://github.com/phpro/soap-client/compare/2.4.1...2.4.2
Generated constructor is descripbed by @param instead of @var. by @h4kuna in https://github.com/phpro/soap-client/pull/468
Full Changelog: https://github.com/phpro/soap-client/compare/2.4.0...2.4.1
Improve ValidatorSubscriber error messages by including property path. by @ademarco in https://github.com/phpro/soap-client/pull/456
Full Changelog: https://github.com/phpro/soap-client/compare/2.3.0...2.4.0
Fix typo in readme.md by @borisson in https://github.com/phpro/soap-client/pull/441
Full Changelog: https://github.com/phpro/soap-client/compare/v2.2.1...2.3.0
Allow all currently available versions of psr/log by @rimas-kudelis in https://github.com/phpro/soap-client/pull/430
Full Changelog: https://github.com/phpro/soap-client/compare/v2.2.0...v2.2.1
Use return types from JsonSerializable/IteratorAggregate (fixes PHP 8.1 deprecations) by @edudobay in https://github.com/phpro/soap-client/pull/415
Full Changelog: https://github.com/phpro/soap-client/compare/v2.1.0...v2.2.0
PHP 8.1 Compatibility by @veewee in https://github.com/phpro/soap-client/pull/400
Full Changelog: https://github.com/phpro/soap-client/compare/v2.0.0...v2.1.0
⚠️⚠️⚠️ There are some BC breaks. Please consult the [UPGRADING DOCUMENTATION](https://github.com/phpro/soap-client/blob/v2.0.0/UPGRADING.md) ⚠️⚠️⚠️
⚠️⚠️⚠️ There are some BC breaks. Please consult the UPGRADING DOCUMENTATION ⚠️⚠️⚠️
The low-level SOAP code has been moved to a separate organisation : https://github.com/php-soap
Total issues resolved: 6
Allow all currently available versions of psr/log by @rimas-kudelis in https://github.com/phpro/soap-client/pull/431
Full Changelog: https://github.com/phpro/soap-client/compare/v1.7.3...v1.7.4
Drop default request Content-Length header, in favor of late computation by @ro0NL in https://github.com/phpro/soap-client/pull/417
Full Changelog: https://github.com/phpro/soap-client/compare/v1.7.2...v1.7.3
work arround differences between guzzle-psr7 and nyholm-psr7 requests by @staabm in https://github.com/phpro/soap-client/pull/401
Full Changelog: https://github.com/phpro/soap-client/compare/v1.7.1...v1.7.2
Full Changelog: https://github.com/phpro/soap-client/compare/v1.7.0...v1.7.1
Full Changelog: https://github.com/phpro/soap-client/compare/v1.7.0...v1.7.1
380: Added generic types to IteratorAggregate in IteratorAssembler thanks to @staabm
Total issues resolved: 3
365: Allow immutable changes on event request / response thanks to @veewe
Total issues resolved: 1
342: clarify HttPlugHandle example thanks to @RafaelKr
Total issues resolved: 6
Phpro\SoapClient\Middleware as an alternative to implement… thanks to @staabm322: Do not set type hint and return type "mixed" on PHP < 8 thanks to @user890104
Total issues resolved: 3
328: Add php80 support thanks to @veewee
Total issues resolved: 1
324: Fix BC break from laminas-code 3.5.0 (#323) thanks to @edudobay
Total issues resolved: 2
314: Fixes binary response error in tests thanks to @janvernieuwe
Total issues resolved: 2
301: fixed required version of psr/http-message in httplug docs thanks to @freezy-sk
Total issues resolved: 6
298: Replace deprecated package jakub-onderka/php-parallel-lint thanks to @drupol
Total issues resolved: 7
void reserved keywords thanks to @Pchol285: Update Psr7Converter.php thanks to @ro0NL
Total issues resolved: 1
273: fix issue-#272 - empty __getLastRequest and __getLastResponse
Total issues resolved: 1
270: Add return 0 for compability with symfomy parent console command
Total issues resolved: 1
247: `Phpro\SoapClient\Client::debugLastSoapRequest()` returns empty `response.body`
259: Fix getClass issue due to bad return types thanks to @janvernieuwe
Total issues resolved: 1
244: Add PHPStan for additional bug detection
Total issues resolved: 5
240: Fixes #239: Use of $this->soapClient in debugLastSoapRequest results in "Undefined property" error
230: Return the new object, since it now is a immutable thanks to @janvernieuwe
Total issues resolved: 2
One column per quarter.