Skip to content

Commit aff91c6

Browse files
committed
symfony bundle doc cleanup
1 parent eacd0af commit aff91c6

File tree

2 files changed

+36
-38
lines changed

2 files changed

+36
-38
lines changed

integrations/symfony-bundle.rst

Lines changed: 34 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This bundle integrate HTTPlug with the Symfony framework. The bundle helps to re
77
Installation
88
````````````
99

10-
Install the Httplug bundle with composer and enable it in your AppKernel.php.
10+
Install the HTTPlug bundle with composer and enable it in your AppKernel.php.
1111

1212
.. code-block:: bash
1313
@@ -53,7 +53,7 @@ Web Debug Toolbar
5353
:align: right
5454
:width: 120px
5555

56-
When using a client configured with HttplugBundle, you will get debug information in the web debug toolbar. It will tell you how many request were made and how many of those that were successful or not. It will also show you detailed information about each request.
56+
When using a client configured with ``HttplugBundle``, you will get debug information in the web debug toolbar. It will tell you how many request were made and how many of those that were successful or not. It will also show you detailed information about each request.
5757

5858
Discovery of Factory Classes
5959
````````````````````````````
@@ -85,15 +85,12 @@ You can configure your clients with default options. These default values will b
8585
config:
8686
# These options are given to Guzzle without validation.
8787
defaults:
88-
base_uri: 'http://google.se/'
8988
verify_ssl: false
9089
timeout: 4
91-
headers:
92-
Content-Type: 'application/json'
9390
acme:
9491
factory: 'httplug.factory.guzzle6'
9592
config:
96-
base_uri: 'http://google.se/'
93+
timeout: 2
9794
9895
.. code-block:: php
9996
@@ -103,7 +100,7 @@ You can configure your clients with default options. These default values will b
103100
// will be the same as ``httplug.client.my_guzzle5``
104101
$httpClient = $this->container->get('httplug.client');
105102
106-
The bundle has client factory services that you can use to build your client. If you need a very custom made client you could create your own factory service implementing ``Http\HttplugBudle\ClientFactory\ClientFactory``. The build in services are:
103+
The bundle has client factory services that you can use to build your client. If you need a very custom made client you could create your own factory service implementing ``Http\HttplugBudle\ClientFactory\ClientFactory``. The built-in services are:
107104

108105
* ``httplug.factory.guzzle5``
109106
* ``httplug.factory.guzzle6``
@@ -158,40 +155,40 @@ You can configure a client with authentication. Valid authentication types are `
158155
List of Services
159156
````````````````
160157

161-
+----------------------------------+-------------------------------------------------------------------------+
162-
| Service id | Description |
163-
+==================================+=========================================================================+
164-
| httplug.message_factory | Service* that provides the `Http\Message\MessageFactory` |
165-
+----------------------------------+-------------------------------------------------------------------------+
166-
| httplug.uri_factory | Service* that provides the `Http\Message\UriFactory` |
167-
+----------------------------------+-------------------------------------------------------------------------+
168-
| httplug.stream_factory | Service* that provides the `Http\Message\StreamFactory` |
169-
+----------------------------------+-------------------------------------------------------------------------+
170-
| httplug.client.[name] | There is one service per named client. |
171-
+----------------------------------+-------------------------------------------------------------------------+
172-
| httplug.client | | If there is a client named "default", this service is an alias to |
173-
| | | that client, otherwise it is an alias to the first client configured. |
174-
+----------------------------------+-------------------------------------------------------------------------+
175-
| | httplug.plugin.content_length | | These are plugins that are enabled by default. |
176-
| | httplug.plugin.decoder | | These services are private and should only be used to configure |
177-
| | httplug.plugin.error | | clients or other services. |
178-
| | httplug.plugin.logger | |
179-
| | httplug.plugin.redirect | |
180-
| | httplug.plugin.retry | |
181-
| | httplug.plugin.stopwatch | |
182-
+----------------------------------+-------------------------------------------------------------------------+
183-
| | httplug.plugin.cache | | These are plugins that are disabled by default and only get |
184-
| | httplug.plugin.cookie | | activated when configured. |
185-
| | httplug.plugin.history | | These services are private and should only be used to configure |
186-
| | | clients or other services. |
187-
+----------------------------------+-------------------------------------------------------------------------+
158+
+-------------------------------------+-------------------------------------------------------------------------+
159+
| Service id | Description |
160+
+=====================================+=========================================================================+
161+
| ``httplug.message_factory`` | Service* that provides the `Http\Message\MessageFactory` |
162+
+-------------------------------------+-------------------------------------------------------------------------+
163+
| ``httplug.uri_factory`` | Service* that provides the `Http\Message\UriFactory` |
164+
+-------------------------------------+-------------------------------------------------------------------------+
165+
| ``httplug.stream_factory`` | Service* that provides the `Http\Message\StreamFactory` |
166+
+-------------------------------------+-------------------------------------------------------------------------+
167+
| ``httplug.client.[name]`` | There is one service per named client. |
168+
+-------------------------------------+-------------------------------------------------------------------------+
169+
| ``httplug.client`` | | If there is a client named "default", this service is an alias to |
170+
| | | that client, otherwise it is an alias to the first client configured. |
171+
+-------------------------------------+-------------------------------------------------------------------------+
172+
| | ``httplug.plugin.content_length`` | | These are plugins that are enabled by default. |
173+
| | ``httplug.plugin.decoder`` | | These services are private and should only be used to configure |
174+
| | ``httplug.plugin.error`` | | clients or other services. |
175+
| | ``httplug.plugin.logger`` | |
176+
| | ``httplug.plugin.redirect`` | |
177+
| | ``httplug.plugin.retry`` | |
178+
| | ``httplug.plugin.stopwatch`` | |
179+
+-------------------------------------+-------------------------------------------------------------------------+
180+
| | ``httplug.plugin.cache`` | | These are plugins that are disabled by default and only get |
181+
| | ``httplug.plugin.cookie`` | | activated when configured. |
182+
| | ``httplug.plugin.history`` | | These services are private and should only be used to configure |
183+
| | | clients or other services. |
184+
+-------------------------------------+-------------------------------------------------------------------------+
188185

189186
\* *These services are always an alias to another service. You can specify your own service or leave the default, which is the same name with `.default` appended.*
190187

191188

192-
Useage for Reusable Bundles
189+
Usage for Reusable Bundles
193190
``````````````````````````
194191

195-
Rather than code against specific HTTP clients, you want to use the Httplug ``Client`` interface. To avoid building your own infrastructure to define services for the client, simply ``require: php-http/httplug-bundle`` in your bundles ``composer.json``. You SHOULD provide a configuration option to specify the which HTTP client service to use for each of your services. This option should default to ``httplug.client``. This way, the default case needs no additional configuration for your users, but they have the option of using specific clients with each of your services.
192+
Rather than code against specific HTTP clients, you want to use the HTTPlug ``Client`` interface. To avoid building your own infrastructure to define services for the client, simply ``require: php-http/httplug-bundle`` in your bundles ``composer.json``. You SHOULD provide a configuration option to specify the which HTTP client service to use for each of your services. This option should default to ``httplug.client``. This way, the default case needs no additional configuration for your users, but they have the option of using specific clients with each of your services.
196193

197-
The only steps they need is ``require`` one of the adapter implementations in their projects ``composer.json`` and instantiating the HttplugBundle in their kernel.
194+
The only steps they need is ``require`` one of the adapter implementations in their projects ``composer.json`` and instantiating the ``HttplugBundle`` in their kernel.

spelling_word_list.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@ plugins
1717
matchers
1818
param
1919
params
20+
Puli
2021
rebase
2122
Semver
2223
sexualized
2324
sublicense
2425
sync
26+
toolbar
2527
username
2628
whitelist
2729
wiki
2830
workflow
29-
Puli

0 commit comments

Comments
 (0)