Skip to content

Commit c0da8c0

Browse files
committed
Use Laminas Diactoros for PSR-7 and PSR-17
1 parent c23544f commit c0da8c0

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"php": ">=7.1",
2121
"react/http": "^1.11",
2222
"react/promise": "^3.2 || ^2.1 || ^1.2",
23+
"laminas/laminas-diactoros": "^3.5 || ^2.4",
2324
"ext-soap": "*"
2425
},
2526
"require-dev": {

src/Protocol/ClientEncoder.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
namespace Clue\React\Soap\Protocol;
44

55
use Psr\Http\Message\RequestInterface;
6-
use RingCentral\Psr7\Request;
6+
use Laminas\Diactoros\Request;
7+
use Laminas\Diactoros\StreamFactory;
78

89
/**
910
* @internal
@@ -56,11 +57,13 @@ public function __doRequest($request, $location, $action, $version, $one_way = 0
5657
);
5758
}
5859

60+
$body = (new StreamFactory())->createStream((string)$request);
61+
5962
$this->request = new Request(
60-
'POST',
6163
(string)$location,
62-
$headers,
63-
(string)$request
64+
'POST',
65+
$body,
66+
$headers
6467
);
6568

6669
// do not actually block here, just pretend we're done...

0 commit comments

Comments
 (0)