Skip to content

Commit 7fbdd81

Browse files
author
Fábio Galvão
committed
chore: Replace php-http/message-factory to psr/http-factory
1 parent 2eca382 commit 7fbdd81

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"php": "^7.2|^8",
4646
"php-http/client-implementation": "^1",
4747
"php-http/message": "^1.5",
48-
"php-http/message-factory": "^1.1",
48+
"psr/http-factory": "^1.0.2",
4949
"php-http/discovery": "^1.14",
5050
"symfony/http-foundation": "^2.1|^3|^4|^5|^6|^7",
5151
"moneyphp/money": "^3.1|^4.0.3"

src/Common/Http/Client.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
use Http\Client\HttpClient;
77
use Http\Discovery\HttpClientDiscovery;
88
use Http\Discovery\MessageFactoryDiscovery;
9-
use Http\Message\RequestFactory;
109
use Omnipay\Common\Http\Exception\NetworkException;
1110
use Omnipay\Common\Http\Exception\RequestException;
1211
use Psr\Http\Message\RequestInterface;
@@ -25,11 +24,11 @@ class Client implements ClientInterface
2524
private $httpClient;
2625

2726
/**
28-
* @var RequestFactory
27+
* @var RequestInterface
2928
*/
3029
private $requestFactory;
3130

32-
public function __construct($httpClient = null, RequestFactory $requestFactory = null)
31+
public function __construct($httpClient = null, RequestInterface $requestFactory = null)
3332
{
3433
$this->httpClient = $httpClient ?: HttpClientDiscovery::find();
3534
$this->requestFactory = $requestFactory ?: MessageFactoryDiscovery::find();

tests/Common/Http/ClientTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use Mockery as m;
88
use GuzzleHttp\Psr7\Request;
99
use Http\Client\HttpClient;
10-
use Http\Message\RequestFactory;
10+
use Psr\Http\Message\RequestInterface as RequestFactory;
1111
use Omnipay\Common\Http\Exception\RequestException;
1212
use Omnipay\Tests\TestCase;
1313

0 commit comments

Comments
 (0)