diff --git a/integrations/symfony-bundle.rst b/integrations/symfony-bundle.rst index 807283b..02197c2 100644 --- a/integrations/symfony-bundle.rst +++ b/integrations/symfony-bundle.rst @@ -207,6 +207,20 @@ services are: * ``httplug.factory.socket`` * ``httplug.factory.mock`` (Install ``php-http/mock-client`` first) +.. note:: + + .. versionadded:: 1.10 + + If you already have a client service registered you can skip using the ``factory`` + and use the ``service`` key instead. + + .. code-block:: yaml + + httplug: + clients: + my_client: + service: 'my_custom_client_service' + Plugins ``````` @@ -366,7 +380,7 @@ To mock a response in your tests, do: // If your test has the client (BrowserKit) make multiple requests, you need to disable reboot as the kernel is rebooted on each request. // $client->disableReboot(); - + $response = $this->createMock('Psr\Http\Message\ResponseInterface'); $response->method('getBody')->willReturn(/* Psr\Http\Message\Interface instance containing expected response content. */); $client->getContainer()->get('httplug.client.mock')->addResponse($response); diff --git a/integrations/symfony-full-configuration.rst b/integrations/symfony-full-configuration.rst index e9f4640..5d85260 100644 --- a/integrations/symfony-full-configuration.rst +++ b/integrations/symfony-full-configuration.rst @@ -71,6 +71,7 @@ This page shows an example of all configuration values provided by the bundle. clients: acme: factory: 'httplug.factory.guzzle6' + service: 'my_service' # Can not be used with "factory" or "config" flexible_client: false # Can only be true if http_methods_client is false http_methods_client: false # Can only be true if flexible_client is false config: