Skip to content

Commit 549491b

Browse files
committed
prepare for version 2 of HttplugBundle
1 parent a440713 commit 549491b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

integrations/symfony-bundle.rst

+4-4
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Usage
8484
8585
.. code-block:: php
8686
87-
$request = $this->container->get('httplug.psr17_request_factory')->createRequest('GET', 'http://example.com');
87+
$request = $this->container->get(\Psr\Http\Message\RequestFactoryInterface::class)->createRequest('GET', 'http://example.com');
8888
$response = $this->container->get('httplug.client.acme')->sendRequest($request);
8989
9090
Autowiring
@@ -205,7 +205,7 @@ the value of ``discovery.client`` to ``false``.
205205
Discovery of Factory Classes
206206
````````````````````````````
207207

208-
You need to specify all the factory classes for you client. The following
208+
You can specify all the factory classes for you client. The following
209209
example shows how you configure factory classes using Guzzle:
210210

211211
.. code-block:: yaml
@@ -250,7 +250,7 @@ services.
250250
$httpClient = $this->container->get('httplug.client.acme');
251251
252252
// will be the same as ``httplug.client.my_guzzle7``
253-
$httpClient = $this->container->get('httplug.client');
253+
$httpClient = $this->container->get(\Psr\Http\Client\ClientInterface::class);
254254
255255
The bundle has client factory services that you can use to build your client.
256256
If you need a very custom made client you could create your own factory service
@@ -562,7 +562,7 @@ To mock a response in your tests, do:
562562
// If your test has the client (BrowserKit) make multiple requests, you need to disable reboot as the kernel is rebooted on each request.
563563
// $client->disableReboot();
564564
565-
$response = $this->createMock('Psr\Http\Message\ResponseInterface');
565+
$response = $this->createMock(Psr\\Http\Message\ResponseInterface:class);
566566
$response->method('getBody')->willReturn(/* Psr\Http\Message\Interface instance containing expected response content. */);
567567
$client->getContainer()->get('httplug.clients.my_awesome_backend.client')->addResponse($response);
568568

integrations/symfony-full-configuration.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ This page shows an example of all configuration values provided by the bundle.
6464
stream_factory: 'httplug.stream_factory'
6565
config:
6666
default_ttl: 3600
67-
respect_cache_headers: true
67+
respect_response_cache_directives: ['no-cache', 'private', 'max-age', 'no-store']
6868
cache_key_generator: null # This must be a service id to a service implementing 'Http\Client\Common\Plugin\Cache\Generator\CacheKeyGenerator'. If 'null' 'Http\Client\Common\Plugin\Cache\Generator\SimpleGenerator' will be used.
6969
cookie:
7070
cookie_jar: my_cookie_jar

0 commit comments

Comments
 (0)