diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/http_client.php b/src/Symfony/Bundle/FrameworkBundle/Resources/config/http_client.php index 447d07a4a1..ddc5caf85a 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/http_client.php +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/http_client.php @@ -58,6 +58,7 @@ return static function (ContainerConfigurator $container) { abstract_arg('delay ms'), abstract_arg('multiplier'), abstract_arg('max delay ms'), + abstract_arg('jitter'), ]) ->set('http_client.retry.abstract_httpstatuscode_decider', HttpStatusCodeDecider::class) ->abstract() diff --git a/src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd b/src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd index 620d065e84..288006092d 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd +++ b/src/Symfony/Bundle/FrameworkBundle/Resources/config/schema/symfony-1.0.xsd @@ -587,6 +587,7 @@ + diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/http_client_retry.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/http_client_retry.php index eeb9e45b40..8fc9e6440d 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/http_client_retry.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/php/http_client_retry.php @@ -11,6 +11,7 @@ $container->loadFromExtension('framework', [ 'delay' => 100, 'multiplier' => 2, 'max_delay' => 0, + 'jitter' => 0.3, ] ], 'scoped_clients' => [ diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/http_client_retry.xml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/http_client_retry.xml index 9d475da0b7..76004166a1 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/http_client_retry.xml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/xml/http_client_retry.xml @@ -12,7 +12,8 @@ delay="100" max-delay="0" max-retries="2" - multiplier="2"> + multiplier="2" + jitter="0.3"> 429 500 diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/http_client_retry.yml b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/http_client_retry.yml index 8b81f3d1be..4cade94440 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/http_client_retry.yml +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/Fixtures/yml/http_client_retry.yml @@ -9,6 +9,7 @@ framework: delay: 100 multiplier: 2 max_delay: 0 + jitter: 0.3 scoped_clients: foo: base_uri: http://example.com diff --git a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php index 990aa19a13..643390fdb6 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php +++ b/src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/FrameworkExtensionTest.php @@ -1504,6 +1504,7 @@ abstract class FrameworkExtensionTest extends TestCase $this->assertSame(100, $container->getDefinition('http_client.retry.exponential_backoff')->getArgument(0)); $this->assertSame(2, $container->getDefinition('http_client.retry.exponential_backoff')->getArgument(1)); $this->assertSame(0, $container->getDefinition('http_client.retry.exponential_backoff')->getArgument(2)); + $this->assertSame(0.3, $container->getDefinition('http_client.retry.exponential_backoff')->getArgument(3)); $this->assertSame(2, $container->getDefinition('http_client.retry')->getArgument(3)); $this->assertSame(RetryableHttpClient::class, $container->getDefinition('foo.retry')->getClass());