liip/soap-recorder-bundle
A Symfony bundle that records SOAP requests and responses and replays them in your test suite, letting integration tests run against realistic SOAP traffic without calling live services. Useful for stable, repeatable PHPUnit tests.
[DEPRECATED] Symfony bundle targeting Symfony 2.x/3.x and pre-PHP-8 runtimes. It is not a Laravel package: there is no service provider, no package-discovery manifest, no Laravel config. Day-to-day leverage in a Laravel codebase is therefore zero if you install it, and high if you read it and reimplement the pattern. Decide up front which of those two you're doing.composer require --dev liip/soap-recorder-bundle, pin a tag or dev-master, and register the bundle manually in AppKernel (new Liip\SoapRecorderBundle\LiipSoapRecorderBundle()) — this predates Flex recipes. Expect to need --ignore-platform-reqs on modern Composer.DependencyInjection/Configuration.php — the only real knobs: where fixtures land and record-vs-replay mode.Resources/config/ service definitions — this shows you how the client decorator is wired into the SOAP client, which is the part worth copying.\SoapClient call in a functional test → route it through the recorder client → run once against the live WSDL endpoint to generate a YAML fixture → flip to replay mode → re-run offline. That single record→replay loop is the entire value proposition. Validate it on one call before investing in anything else.HttpClient? If yes, Http::fake() or php-vcr buys you most of this with no framework mismatch. If it's a hand-rolled ext-soap wrapper or a vendor SDK client, you'll implement the decorator yourself — use this repo as the reference implementation.SoapClient with the same WSDL and options so call sites stay untouched. Swap the construction point (a factory or DI service), not the business logic. In Laravel the analogue is binding your client interface in a service provider and swapping the binding in TestCase::setUp().SoapClientInterface::call($method, array $args)) that your application code depends on. Production gets the real ext-soap client; tests get RecordingSoapClient (writes fixtures) or ReplaySoapClient (reads them). This is ~200–400 LOC and is cheaper to own than a patched fork of an archived bundle.record (call live, save fixture), replay (serve fixture, never touch network), passthrough (call live, save nothing). Default to replay in CI; make record an explicit, deliberate, human-run action. This mirrors the bundle's configuration and is the pattern that keeps CI honest.HttpClient, HTTP-layer record/replay (php-vcr, or Http::fake() with checked-in response XML) covers the same need without touching SOAP semantics at all. Reach for SOAP-layer interception only when the client hides the transport from you.ext-soap compatibility work, no fixes for faults, typed SOAP objects, or MTOM/attachments. In a Laravel app this alone disqualifies adoption; treat the codebase as reference only.ext-soap is a hard CI dependency. Verify it's installed in every build image, including parallel test workers and the container your CI uses for the record job. Missing extension produces opaque failures.UsernameToken, and PII in the body. Recorded YAML gets committed. Redact at write time (not review time) and add a pre-commit secret scan. This is the highest-severity operational risk with this pattern.How can I help you explore Laravel packages today?