Skip to content
This repository was archived by the owner on Jun 25, 2025. It is now read-only.

Commit 2edc5c0

Browse files
authored
Merge pull request #45 from apisearch-io/feature/updated-php-client-curl
Using new php client version
2 parents 4a1c181 + 9bb5f36 commit 2edc5c0

File tree

3 files changed

+19
-296
lines changed

3 files changed

+19
-296
lines changed

DependencyInjection/CompilerPass/RepositoryCompilerPass.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
use Apisearch\App\InMemoryAppRepository;
2121
use Apisearch\Http\GuzzleClient;
2222
use Apisearch\Http\RetryMap;
23+
use Apisearch\Http\TCPClient;
2324
use Apisearch\Http\TestClient;
2425
use Apisearch\Model\AppUUID;
2526
use Apisearch\Model\IndexUUID;
@@ -212,10 +213,10 @@ private function createClient(
212213
])
213214
->setPublic($this->repositoryIsTest($repositoryConfiguration))
214215
: $container
215-
->register($clientName, GuzzleClient::class)
216+
->register($clientName, TCPClient::class)
216217
->setArguments([
217-
new Reference('apisearch.guzzle_client_adapter'),
218218
$repositoryConfiguration['endpoint'],
219+
new Reference('apisearch.http_adapter'),
219220
$repositoryConfiguration['version'],
220221
new reference($clientRetryMapName),
221222
])

Resources/config/http.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
services:
22

33
#
4-
# Commands
4+
# HTTP
55
#
6-
apisearch.guzzle_client_adapter:
7-
class: GuzzleHttp\Client
8-
arguments:
9-
- { defaults: { timeout: 5, http_errors: false } }
6+
apisearch.http_curl_adapter:
7+
class: Apisearch\Http\CurlAdapter
8+
9+
apisearch.http_adapter:
10+
alias: apisearch.http_curl_adapter

0 commit comments

Comments
 (0)