10000 minor #14450 Fix documentation about RetryStrategy (jderusse) · symfony/symfony-docs@3ed39a4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3ed39a4

Browse files
committed
minor #14450 Fix documentation about RetryStrategy (jderusse)
This PR was merged into the 5.x branch. Discussion ---------- Fix documentation about RetryStrategy Change introduced in symfony/symfony#38532 Commits ------- 19521c3 Fix documentation about RetryStrategy
2 parents fee4b81 + 19521c3 commit 3ed39a4

File tree

2 files changed

+22
-40
< 10000 span class=" ml-2 fgColor-muted text-small" style="white-space:nowrap">lines changed

2 files changed

+22
-40
lines changed

http_client.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -710,10 +710,9 @@ original HTTP client::
710710
$client = new RetryableHttpClient(HttpClient::create());
711711

712712
The ``RetryableHttpClient`` uses a
713-
:class:`Symfony\\Component\\HttpClient\\Retry\\RetryDeciderInterface` to
714-
decide if the request should be retried, and a
715-
:class:`Symfony\\Component\\HttpClient\\Retry\\RetryBackOffInterface` to
716-
define the waiting time between each retry.
713+
:class:`Symfony\\Component\\HttpClient\\Retry\\RetryStrategyInterface` to
714+
decide if the request should be retried, and to define the waiting time between
715+
each retry.
717716

718717
HTTP Proxies
719718
~~~~~~~~~~~~

reference/configuration/framework.rst

Lines changed: 19 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,7 @@ Configuration
140140

141141
* :ref:`retry_failed <reference-http-client-retry-failed>`
142142

143-
* `backoff_service`_
144-
* `decider_service`_
143+
* `retry_strategy`_
145144 10000
* :ref:`enabled <reference-http-client-retry-enabled>`
146145
* `delay`_
147146
* `http_codes`_
@@ -157,8 +156,7 @@ Configuration
157156

158157
* :ref:`retry_failed <reference-http-client-retry-failed>`
159158

160-
* `backoff_service`_
161-
* `decider_service`_
159+
* `retry_strategy`_
162160
* :ref:`enabled <reference-http-client-retry-enabled>`
163161
* `delay`_
164162
* `http_codes`_
@@ -780,8 +778,7 @@ will automatically retry failed HTTP requests.
780778
http_client:
781779
# ...
782780
retry_failed:
783-
# backoff_service: app.custom_backoff
784-
# decider_service: app.custom_decider
781+
# retry_strategy: app.custom_strategy
785782
http_codes: [429, 500]
786783
max_retries: 2
787784
delay: 1000
@@ -826,21 +823,6 @@ in the `Microsoft NTLM authentication protocol`_. The value of this option must
826823
follow the format ``username:password``. This authentication mechanism requires
827824
using the cURL-based transport.
828825

829-
backoff_service
830-
...............
831-
832-
**type**: ``string``
833-
834-
.. versionadded:: 5.2
835-
836-
The ``backoff_service`` option was introduced in Symfony 5.2.
837-
838-
The service id used to compute the time to wait between retries. By default, it
839-
uses an instance of
840-
:class:`Symfony\\Component\\HttpClient\\Retry\\ExponentialBackOff` configured
841-
with ``delay``, ``max_delay``, ``multiplier`` and ``jitter`` options. This
842-
class has to implement :class:`Symfony\\Component\\HttpClient\\Retry\\RetryBackOffInterface`.
843-
844826
base_uri
845827
........
846828

@@ -909,21 +891,6 @@ ciphers
909891
A list of the names of the ciphers allowed for the SSL/TLS connections. They
910892
can be separated by colons, commas or spaces (e.g. ``'RC4-SHA:TLS13-AES-128-GCM-SHA256'``).
911893

912-
decider_service
913-
...............
914-
915-
**type**: ``string``
916-
917-
.. versionadded:: 5.2
918-
919-
The ``decider_service`` option was introduced in Symfony 5.2.
920-
921-
The service id used to decide if a request should be retried. By default, it
922-
uses an instance of
923-
:class:`Symfony\\Component\\HttpClient\\Retry\\HttpStatusCodeDecider` configured
924-
with the ``http_codes`` option. This class has to implement
925-
:class:`Symfony\\Component\\HttpClient\\Retry\\RetryDeciderInterface`.
926-
927894
delay
928895
.....
929896

@@ -1124,6 +1091,22 @@ client and to make your tests easier.
11241091
The value of this option is an associative array of ``domain => IP address``
11251092
(e.g ``['symfony.com' => '46.137.106.254', ...]``).
11261093

1094+
retry_strategy
1095+
...............
1096+
1097+
**type**: ``string``
1098+
1099+
.. versionadded:: 5.2
1100+
1101+
The ``retry_strategy`` option was introduced in Symfony 5.2.
1102+
1103+
The service is used to decide if a request should be retried and to compute the
1104+
time to wait between retries. By default, it uses an instance of
1105+
:class:`Symfony\\Component\\HttpClient\\Retry\\GenericRetryStrategy` configured
1106+
with ``http_codes``, ``delay``, ``max_delay``, ``multiplier`` and ``jitter``
1107+
options. This class has to implement
1108+
:class:`Symfony\\Component\\HttpClient\\Retry\\RetryStrategyInterface`.
1109+
11271110
scope
11281111
.....
11291112

0 commit comments

Comments
 (0)
0