Skip to content

Commit 4b2a6f0

Browse files
committed
replace php-http client with symfony/http-client
1 parent 7191893 commit 4b2a6f0

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"psr/http-message": "^1.1 || ^2.0",
4444
"psr/http-message-implementation": "*",
4545
"symfony/filesystem": "^6.1",
46+
"symfony/http-client": "^6.3",
4647
"symfony/process": "^6.1"
4748
},
4849
"suggest": {

src/DockerClientFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
use Http\Client\Common\Plugin\DecoderPlugin;
1111
use Http\Client\Common\Plugin\HeaderDefaultsPlugin;
1212
use Http\Client\Common\PluginClientFactory;
13-
use Http\Client\Socket\Client;
1413
use Http\Discovery\UriFactoryDiscovery;
1514
use Psr\Http\Client\ClientInterface;
15+
use Symfony\Component\HttpClient\Psr18Client;
1616

1717
final class DockerClientFactory
1818
{
@@ -22,7 +22,7 @@ public static function create(array $config = [], PluginClientFactory $pluginCli
2222
$config['remote_socket'] = 'unix:///var/run/docker.sock';
2323
}
2424

25-
$socketClient = new Client($config);
25+
$socketClient = new Psr18Client();
2626

2727
$uriFactory = UriFactoryDiscovery::find();
2828
$host = \preg_match('/unix:\/\//', $config['remote_socket']) ? 'http://localhost' : $config['remote_socket'];

0 commit comments

Comments
 (0)