Skip to content

Commit 83bc157

Browse files
authored
Merge pull request #430 from ruudk/mock-client-interface
Use ClientInterface in MockFactory
2 parents 894143b + f1dd9d5 commit 83bc157

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

Diff for: .github/workflows/continuous-integration.yml

-4
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,6 @@ jobs:
4444
php-version: "8.2"
4545
symfony-deprecations-helper: "weak"
4646

47-
# Test with httplug 1.x clients
48-
- dependencies: "php-http/buzz-adapter:^1.0 php-http/guzzle6-adapter:^1.1.1 php-http/react-adapter:^0.2.1"
49-
php-version: "7.3"
50-
symfony-deprecations-helper: "weak"
5147
# Test with httplug 2.x clients
5248
- dependencies: "php-http/guzzle7-adapter php-http/curl-client:^2.0.0 php-http/vcr-plugin:^1.0@dev php-http/socket-client:^2.0"
5349
php-version: "7.3"

Diff for: composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"php-http/client-common": "^1.9 || ^2.0",
3030
"php-http/client-implementation": "^1.0",
3131
"php-http/discovery": "^1.14",
32-
"php-http/httplug": "^1.0 || ^2.0",
32+
"php-http/httplug": "^2.0",
3333
"php-http/logger-plugin": "^1.1",
3434
"php-http/message": "^1.4",
3535
"php-http/message-factory": "^1.0.2",

Diff for: src/ClientFactory/MockFactory.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44

55
namespace Http\HttplugBundle\ClientFactory;
66

7-
use Http\Client\HttpClient;
87
use Http\Mock\Client;
8+
use Psr\Http\Client\ClientInterface;
99

1010
/**
1111
* @author Gary PEGEOT <[email protected]>
1212
*/
1313
final class MockFactory implements ClientFactory
1414
{
1515
/**
16-
* @var HttpClient
16+
* @var ClientInterface
1717
*/
1818
private $client;
1919

@@ -22,7 +22,7 @@ final class MockFactory implements ClientFactory
2222
*
2323
* Note that this can be any client, not only a mock client.
2424
*/
25-
public function setClient(HttpClient $client)
25+
public function setClient(ClientInterface $client)
2626
{
2727
$this->client = $client;
2828
}

0 commit comments

Comments
 (0)