php-configuration-resiliencelisted
Install: claude install-skill MuHamza30/paypal-api-plugin
# Configuration & resilience for an APIMatic PHP SDK
Everything is set on the client builder at construction time (see **php-client-initialization**). There
is no per-request options argument and no way to reach the underlying HTTP client.
```php
$client = {Client}Builder::init()
->environment(Environment::{CONSTANT})
->timeout(30) // SECONDS
->enableRetries(true)
->numberOfRetries(3)
->maximumRetryWaitTime(30) // REQUIRED — see below; 0 retries nothing
->build();
```
> The `maximumRetryWaitTime` line is not optional. `MAXIMUM_RETRY_WAIT_TIME` is generated per SDK and is
> commonly `0`, and a budget of `0` fits no backoff interval, so
> `enableRetries(true)` plus `numberOfRetries(3)` without it retries **nothing**. Check the constant in
> `src/ConfigurationDefaults.php`.
## Read the real defaults — they are generated, not universal
`src/ConfigurationDefaults.php` holds a `public const` for every option. **Those constants are this
SDK's defaults**; they are fixed when the SDK is generated, so they differ from SDK to SDK. Read them
rather than assuming:
`TIMEOUT`, `ENABLE_RETRIES`, `NUMBER_OF_RETRIES`, `RETRY_INTERVAL`, `BACK_OFF_FACTOR`,
`MAXIMUM_RETRY_WAIT_TIME`, `RETRY_ON_TIMEOUT`, `HTTP_STATUS_CODES_TO_RETRY`, `HTTP_METHODS_TO_RETRY`,
`ENVIRONMENT`, `PROXY_CONFIGURATION`.
The one default that does **not** vary: `ENABLE_RETRIES` is always generated as `false`.
## Retries
The values below are an **illustrative po