Skip to content

Commit b487394

Browse files
committed
various symfony bundle doc cleanup
1 parent 2018063 commit b487394

File tree

7 files changed

+47
-53
lines changed

7 files changed

+47
-53
lines changed

httplug/application-developers.rst

-11
This file was deleted.

httplug/introduction.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ Usage
4444

4545
There are two main use cases for HTTPlug:
4646

47-
* usage in an application that executes HTTP requests (see :doc:`application-developers`).
48-
* usage in a reusable package that executes HTTP requests (see :doc:`library-developers`).
47+
* Usage in an application that executes HTTP requests (see :doc:`tutorial` and :doc:`../integrations/index`);
48+
* Usage in a reusable package that executes HTTP requests (see :doc:`library-developers`).
4949

5050
History
5151
-------

httplug/tutorial.rst

+6
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ take into account when building a reusable package.
1111

1212
We use Composer_ for dependency management. Install it if you don't have it yet.
1313

14+
.. note::
15+
16+
If you are using a framework, check the :doc:`../integrations/index` to see if
17+
there is an integration available. Framework integrations will simplify the way
18+
you set up clients, letting you focus on handling the requests.
19+
1420
Setting up the project
1521
----------------------
1622

httplug/usage.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ HTTPlug is relevant for three groups of users:
77
:maxdepth: 1
88

99
Library users <users>
10-
Application developers <application-developers>
10+
Application developers <tutorial>
1111
Library developers <library-developers>
1212

integrations/index.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
Integrations
2-
============
1+
Framework Integrations
2+
======================
33

44
HTTPlug provides the following framework integrations:
55

integrations/symfony-bundle.rst

+34-36
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ Symfony Bundle
33

44
This bundle integrate HTTPlug with the Symfony framework. The bundle helps to register services for all your clients and makes sure all the configuration is in one place. The bundle also feature a toolbar plugin with information about your requests.
55

6+
This guide explains how to configure HTTPlug in the Symfony framework. See the :doc:`../httplug/tutorial` for examples how to use HTTPlug in general.
67

78
Installation
89
````````````
910

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

1213
.. code-block:: bash
1314
@@ -53,7 +54,7 @@ Web Debug Toolbar
5354
:align: right
5455
:width: 120px
5556

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.
57+
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.
5758

5859
Discovery of Factory Classes
5960
````````````````````````````
@@ -85,11 +86,8 @@ You can configure your clients with default options. These default values will b
8586
config:
8687
# These options are given to Guzzle without validation.
8788
defaults:
88-
base_uri: 'http://google.se/'
8989
verify_ssl: false
9090
timeout: 4
91-
headers:
92-
Content-Type: 'application/json'
9391
acme:
9492
factory: 'httplug.factory.curl'
9593
config:
@@ -103,7 +101,7 @@ You can configure your clients with default options. These default values will b
103101
// will be the same as ``httplug.client.my_guzzle5``
104102
$httpClient = $this->container->get('httplug.client');
105103
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:
104+
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:
107105

108106
* ``httplug.factory.curl``
109107
* ``httplug.factory.guzzle5``
@@ -161,40 +159,40 @@ You can configure a client with authentication. Valid authentication types are `
161159
List of Services
162160
````````````````
163161

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

192190
\* *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.*
193191

194192

195-
Useage for Reusable Bundles
193+
Usage for Reusable Bundles
196194
``````````````````````````
197195

198-
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.
196+
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.
199197

200-
The only steps they need is ``require`` one of the adapter implementations in their projects ``composer.json`` and instantiating the HttplugBundle in their kernel.
198+
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

+2-1
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)