Skip to content

Commit

Permalink
docs: update config example
Browse files Browse the repository at this point in the history
  • Loading branch information
owenvoke committed Jun 20, 2024
1 parent 7479bdc commit 16223d2
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 15 deletions.
50 changes: 37 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,48 @@ return [
* https://docs.launchdarkly.com/sdk/features/offline-mode
*/
'offline' => env('LAUNCHDARKLY_OFFLINE', false)
]
],
/**
* @link https://docs.launchdarkly.com/home/account-security/api-access-tokens
*/
'access-token' => env('FEATURE_FLAGS_API_ACCESS_TOKEN', null),
]
],

/**
* Overrides all feature flags directly without hitting the provider.
* This is particularly useful for running things in the CI,
* e.g. Cypress tests.
* List of available overriders.
* Key is to be used to specify which overrider should be active.
*/
'override-all' => env('FEATURE_FLAGS_OVERRIDE_ALL'),

/**
* Override flags. If a feature flag is set inside an override,
* it will be used instead of the flag set in the provider.
*
* Usage: ['feature-flag-key' => true]
*/
'overrides' => [],
'overriders' => [
'config' => [
/**
* Overrides all feature flags directly without hitting the provider.
* This is particularly useful for running things in the CI,
* e.g. Cypress tests.
*
* Be careful in setting a default value as said value will be applied to all flags.
* Use `null` value if needing the key to be present but act as if it was not
*/
'override-all' => null,

/**
* Override flags. If a feature flag is set inside an override,
* it will be used instead of the flag set in the provider.
*
* Usage: ['feature-flag-key' => true]
*
* Be careful in setting a default value as it will be applied.
* Use `null` value if needing the key to be present but act as if it was not
*
*/
'overrides' => [
// ...
],
],
'in-memory' => [
// ...
]
],
];
```

Expand Down
3 changes: 1 addition & 2 deletions config/feature-flags.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@

/**
* List of available overriders.
* Key is to be used to specify which overrider should be active
*
* Key is to be used to specify which overrider should be active.
*/
'overriders' => [
'config' => [
Expand Down

0 comments on commit 16223d2

Please sign in to comment.