diff --git a/examples/ext-soap-transport.php b/examples/ext-soap-transport.php new file mode 100644 index 0000000..d2b1bf2 --- /dev/null +++ b/examples/ext-soap-transport.php @@ -0,0 +1,29 @@ + 0, + ]) + ) + ), + $transport = new TraceableTransport( + $client, + new ExtSoapClientTransport($client) + ) +); + +$result = $engine->request('Add', [['intA' => 1, 'intB' => 2]]); + +var_dump($result); +var_dump($transport->collectLastRequestInfo()); diff --git a/src/AbusedClient.php b/src/AbusedClient.php index a8437b3..94fdaaf 100644 --- a/src/AbusedClient.php +++ b/src/AbusedClient.php @@ -63,7 +63,7 @@ public function doActualRequest( bool $oneWay = false ): string { $this->__last_request = $request; - $this->__last_response = parent::__doRequest($request, $location, $action, $version, $oneWay); + $this->__last_response = (string) parent::__doRequest($request, $location, $action, $version, $oneWay); return $this->__last_response; } diff --git a/stubs/SoapClient.phpstub b/stubs/SoapClient.phpstub index 250db4a..e74d67a 100644 --- a/stubs/SoapClient.phpstub +++ b/stubs/SoapClient.phpstub @@ -7,5 +7,5 @@ class SoapClient * @see https://github.com/vimeo/psalm/issues/6901 * This can be removed once it is fixed in psalm */ - public function __doRequest (string $request, string $location, string $action, int $version, bool $one_way = false) {} + public function __doRequest (string $request, string $location, string $action, int $version, bool $one_way = false): ?string {} }