econea/nusoap
NuSOAP for Laravel: a maintained PHP SOAP client/server library packaged for modern apps. Call WSDL services, build SOAP requests/responses, and integrate legacy SOAP APIs without the native SOAP extension, with Composer-friendly installation.
contributte/nusoap, v0.9.20) remains a NuSOAP fork for modern PHP (5.6–8.5), targeting SOAP-based integrations with legacy systems (e.g., banks, government APIs, or enterprise ERP/CRM). Its fit is unchanged:
undefined output message (PR 802484f443cf16495eb085f04351076456077f99) is a low-risk bugfix targeting edge cases in SOAP response parsing. No architectural changes.SoapClient deprecations in PHP 8.2+ (e.g., nusoap_client may still trigger warnings).soap, dom, xml). The bugfix does not alter this.// Updated with error handling for the fixed warning
$client = new \nusoap_client('https://legacy-api.example.com/soap', 'wsdl');
try {
$response = $client->call('LegacyMethod', ['param1' => 'value']);
if ($client->fault) {
throw new \RuntimeException($client->faultstring);
}
} catch (\nusoap_fault $fault) {
throw new \RuntimeException("SOAP Fault: {$fault->faultstring}");
}
| Risk Area | Severity | Mitigation Strategy | Update for v0.9.20 |
|---|---|---|---|
| SOAP Deprecation | High | Document migration path to REST/gRPC. | No change. |
| PHP Version Quirks | Medium | Test on PHP 8.0–8.5; polyfill missing features. | Add: Verify the warning fix resolves issues in PHP 8.2+. |
| WS-Security | Medium | Use nusoap’s built-in security or phpseclib. |
No change. |
| Performance | Low | Cache responses if possible. | No change. |
| Maintenance Burden | High | Fork if critical fixes needed. | Update: The warning fix reduces edge-case risks but does not eliminate the need for forking. |
try-catch blocks.undefined output message. Example:
$client->setErrorLogging(true); // Ensure warnings are captured
php-soap-mock).soap, dom, xml).// config/app.php
'bindings' => [
\App\Services\LegacySoapService::class => function ($app) {
$client = new \nusoap_client('https://api.example.com/soap', 'wsdl');
$client->setErrorLogging(true); // Capture warnings
return new \App\Services\LegacySoapService($client);
},
];
fruitcake/laravel-soap or custom REST proxies remain viable if SOAP is avoidable.// In a service class
$client->setErrorLogging(true);
error_reporting(E_ALL & ~E_WARNING); // Suppress warnings if needed
SoapClient changes.phpunit/phpunit@^10 and add a test case for the warning scenario.$client = new \nusoap_client('...');
$client->setErrorLogging(true);
composer.json:
"contributte/nusoap": "^0.9.20"
/**
* @throws \RuntimeException If SOAP call fails or warnings occur.
*/
public function callLegacySoap(): mixed
| Failure Mode | Impact | Mitigation |
|---|---|---|
| SOAP Provider Downtime | High (blocking calls) | Implement retries with exponential backoff. |
| Warning Logs | Low (noise) | Suppress warnings or log selectively. |
| PHP 8.2+ Incompatibilities | Medium (crashes) | Test early; fork if needed. |
| WS-Security Misconfig | High (auth failures) | Use nusoap’s built-in security. |
"Note: v0.9.20 fixes warnings for undefined SOAP output messages. Enable
$client->setErrorLogging(true)to capture these."
How can I help you explore Laravel packages today?