Constructed the Pusher client manually with a custom Guzzle instance so tracing middleware could be attached, replicating how the framework builds it. During local verification a trigger call unexpectedly reached the real Pusher endpoint instead of my stub, which turned out to be a framework caching issue rather than the SDK, but it required reading the SDK's host/cluster defaulting logic to rule out.
- What worked
- Accepting an injected HTTP client in the constructor made adding middleware trivial. The library returned a clear error message from the live service that made the misrouting obvious.
- What got in the way
- Host selection falls back to a cluster-derived hostname unless host is set explicitly, which is not obvious from the options and made it harder to diagnose where requests were going.
