Skip to content

Commit 7c95255

Browse files
committed
minor #11648 [HttpClient] Service name (Guikingone)
This PR was merged into the 4.3 branch. Discussion ---------- [HttpClient] Service name Hi everyone 👋 I've tried to use multiples clients and it seems that the services are named as the configuration (ex: `@crawler.client`) declares it and not using the `@http_client.client` syntax, I don't know if it's a normal behaviour or just an error on the documentation 🙁 Thanks for the feedback Commits ------- 0f4f64e fix(DI): service name
2 parents ede9bc8 + 0f4f64e commit 7c95255

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/http_client.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,11 +483,11 @@ has a unique service named after its configuration.
483483
# ...
484484
485485
# whenever a service type-hints HttpClientInterface, inject the GitHub client
486-
Symfony\Contracts\HttpClient\HttpClientInterface: '@api_client.github'
486+
Symfony\Contracts\HttpClient\HttpClientInterface: '@some_api.client'
487487
488488
# inject the HTTP client called 'crawler' into this argument of this service
489489
App\Some\Service:
490-
$someArgument: '@http_client.crawler'
490+
$someArgument: '@crawler.client'
491491
492492
Testing HTTP Clients and Responses
493493
----------------------------------

0 commit comments

Comments
 (0)