- How do I install and configure Soapy in a Laravel application?
- Install it with Composer using composer require sourcetoad/soapy, then publish the package configuration. Define named clients in config with their WSDL, endpoint, and options, and resolve them through the provided facade or manager. This keeps SoapClient setup out of your application code and fits Laravel config caching and service-container conventions.
- Does Soapy support Laravel 12 and PHP 8.4?
- Yes, v3.1.0 is a compatibility release that adds PHP 8.4 and Laravel 12 support. Use ^3.1 as the minimum constraint if you are on Laravel 12 or PHP 8.4. No new public API is advertised, so validate the upgrade with your own test suite rather than assuming drop-in behavior.
- What are the requirements for using sourcetoad/soapy?
- The hard prerequisite is the ext-soap PHP extension in every runtime image, including local, CI, staging, production, queue workers, and scheduler containers. The package targets Laravel 11/12 on PHP 8.2 through 8.4 when using v3.1.0. Missing ext-soap is the most common first-day blocker, so verify it before committing.
- How does Soapy handle mocking and testing SOAP calls in CI?
- Soapy provides test-friendly fakes so you can exercise SOAP integrations without calling live endpoints. That helps with CI unit and integration tests, but you should still add contract tests against versioned WSDL or provider sandboxes where possible. Confirm the fake mechanism covers the options, headers, and response shapes your services rely on.
- Can Soapy add retries, timeouts, or circuit breaking to SOAP calls?
- No. Soapy is a thin wrapper around PHP's native ext-soap client and does not provide retries, circuit breaking, queuing, or async transport. Those concerns remain in your application layer, such as Laravel jobs, HTTP client policies, or an internal client wrapper. Design timeout and idempotency behavior explicitly around the package.
- How do I define multiple SOAP clients with different WSDL endpoints and credentials in Soapy?
- Soapy is configuration-driven: you declare named clients with their own WSDL, endpoint, and options, then resolve the one you need. That pattern can support per-tenant credentials or distinct upstream services when the values are expressible as client options. If you need dynamic custom headers or complex credential rotation, check whether the configuration surface covers it or plan a small extension.
- Does Soapy support WS-Security, MTOM attachments, or custom SOAP headers?
- SOAP features such as WS-Security, MTOM attachments, and custom headers are not explicitly advertised as first-class Soapy features. Because the package wraps ext-soap, some behavior may be reachable through native SOAP options, but you may need to extend the wrapper. Validate these requirements early with a spike against the real provider WSDL.
- How do I troubleshoot WSDL parsing or SOAP errors when using Soapy?
- Since Soapy delegates to ext-soap, most WSDL parsing and SOAP faults surface with native SoapClient semantics. Check that the WSDL URL is reachable from the runtime, inspect SSL context and encoding options, and use Laravel logging around the client call. For deep issues, compare behavior with a raw SoapClient call to isolate whether the problem is configuration or the provider contract.
- Is sourcetoad/soapy actively maintained and safe for production use?
- Treat sourcetoad/soapy as a small open-source dependency with a narrow contributor base and infrequent releases. Pin the version in composer.json, review release notes for compatibility updates like v3.1.0, and keep a fallback plan such as a thin internal wrapper if maintenance slows. The larger risk is usually WSDL or version drift on the SOAP provider side, not the package code.
- What alternatives exist to Soapy for SOAP integration in Laravel?
- Alternatives include calling PHP's native SoapClient directly, adopting a different Laravel SOAP package, or writing an internal adapter tailored to your providers. Soapy fits teams that want a minimal, config-driven Laravel wrapper with fakes rather than a full resilience or enterprise integration layer. Choose based on how much built-in retry, security, and attachment support you need.