Skip to content

Commit 21ef2a9

Browse files
author
Joel Butcher
committed
Replace depreacted 'MessageFactoryDiscovery::find' with 'Psr17FactoryDiscovery::findRequestFactory' from http-factory
1 parent ab8f91e commit 21ef2a9

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

composer.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,12 @@
1616
},
1717
"require": {
1818
"php": "^7.3 || ^8.0",
19-
"psr/http-message": "^1.0",
2019
"php-http/client-implementation": "^1.0",
21-
"php-http/httplug": "^1.0",
2220
"php-http/discovery": "^1.0",
23-
"php-http/message": "^1.0"
21+
"php-http/httplug": "^1.0",
22+
"php-http/message": "^1.0",
23+
"psr/http-factory": "^1.0",
24+
"psr/http-message": "^1.0"
2425
},
2526
"require-dev": {
2627
"mockery/mockery": "^1.0",

src/Client.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
use Facebook\Exception\SDKException;
2727
use Http\Client\HttpClient;
2828
use Http\Discovery\HttpClientDiscovery;
29-
use Http\Discovery\MessageFactoryDiscovery;
29+
use Http\Discovery\Psr17FactoryDiscovery;
3030

3131
class Client
3232
{
@@ -189,7 +189,7 @@ public function sendRequest(Request $request)
189189
list($url, $method, $headers, $body) = $this->prepareRequestMessage($request);
190190

191191
$psr7Response = $this->httpClient->sendRequest(
192-
MessageFactoryDiscovery::find()->createRequest($method, $url, $headers, $body)
192+
Psr17FactoryDiscovery::findRequestFactory()->createRequest($method, $url, $headers, $body)
193193
);
194194

195195
static::$requestCount++;

0 commit comments

Comments
 (0)