diff --git a/.changes/nextrelease/update-default-retries.json b/.changes/nextrelease/update-default-retries.json new file mode 100644 index 0000000000..296ffdc1b6 --- /dev/null +++ b/.changes/nextrelease/update-default-retries.json @@ -0,0 +1,7 @@ +[ + { + "type": "enhancement", + "category": "Retry", + "description": "Updates default retry mode from `legacy` to `standard` ." + } +] diff --git a/src/Retry/ConfigurationProvider.php b/src/Retry/ConfigurationProvider.php index db641f2204..5149a912c3 100644 --- a/src/Retry/ConfigurationProvider.php +++ b/src/Retry/ConfigurationProvider.php @@ -46,7 +46,7 @@ class ConfigurationProvider extends AbstractConfigurationProvider implements ConfigurationProviderInterface { const DEFAULT_MAX_ATTEMPTS = 3; - const DEFAULT_MODE = 'legacy'; + const DEFAULT_MODE = 'standard'; const ENV_MAX_ATTEMPTS = 'AWS_MAX_ATTEMPTS'; const ENV_MODE = 'AWS_RETRY_MODE'; const ENV_PROFILE = 'AWS_PROFILE'; diff --git a/tests/Retry/ConfigurationProviderTest.php b/tests/Retry/ConfigurationProviderTest.php index f1541f9a69..ae5ae49683 100644 --- a/tests/Retry/ConfigurationProviderTest.php +++ b/tests/Retry/ConfigurationProviderTest.php @@ -107,7 +107,7 @@ function (ConfigurationException $e) { public function testCreatesDefaultFromFallback() { $this->clearEnv(); - $expected = new Configuration('legacy', 3); + $expected = new Configuration('standard', 3); /** @var ConfigurationInterface $result */ $result = call_user_func(ConfigurationProvider::fallback())->wait(); $this->assertSame($expected->toArray(), $result->toArray()); @@ -142,7 +142,7 @@ public function testUsesIniWithUseAwsConfigFileTrue() public function testIgnoresIniWithUseAwsConfigFileFalse() { $dir = $this->clearEnv(); - $expected = new Configuration('legacy', 3); + $expected = new Configuration('standard', 3); file_put_contents($dir . '/config', $this->iniFile); putenv('HOME=' . dirname("garbageDirectory")); /** @var ConfigurationInterface $result */