Releases: configcat/php-sdk
Releases · configcat/php-sdk
v6.2.1
v6.2.0
Added
setDefaultUser(user)
/clearDefaultUser()
methods to set / remove a default user object used when there's no user passed togetValue()
/getValueDetails()
/getAllValues()
/getAllVariationIds()
methods.setOffline() / setOnline()
methods to indicate whether the SDK is allowed to make HTTP calls or not. In 'offline' mode the SDK works from the cache only.onConfigChanged([String => Setting])
/onFlagEvaluated(EvaluationDetails)
/onError(String)
hooks. Subscription is possible on thehooks()
property ofConfigCatClient
.getValueDetails()
method to retrieve evaluation details along with the feature flag / setting value. It returns the same details that is passed toonFlagEvaluated(EvaluationDetails)
on each evaluation.forceRefresh()
method returns with a result object to indicate whether the refresh succeeded or not.
Changed
ArrayCache
has a global static array now that caches the entries between eachConfigCatClient
instance. The only differentiator is thesdkKey
, so each client instance with the samesdkKey
will use the same cache entry.
v6.1.0
v6.0.0
Changed
- Increased the minimum required PHP version to 7.1
Breaking changes
- Added the appropriate type hints to publicly available methods:
// Cache: abstract protected function get(string $key); -> abstract protected function get(string $key): ?string; abstract protected function get(string $key); -> abstract protected function set(string $key, string $value): void; // ConfigCatClient: function getValue($key, $defaultValue, User $user = null) -> function getValue(string $key, $defaultValue, User $user = null) function getVariationId($key, $defaultVariationId, User $user = null) -> function getVariationId(string $key, $defaultVariationId, User $user = null) function getAllVariationIds(User $user = null) -> function getAllVariationIds(User $user = null): array function getKeyAndValue($variationId) -> function getKeyAndValue(string $variationId): ?Pair function getAllKeys() -> function getAllKeys(): array function getAllValues(User $user = null) -> function getAllValues(User $user = null): array function forceRefresh() -> function forceRefresh(): void
v5.4.1
v5.4.0
Fixed
- The evaluation logs are staying on
info
level but they are now combined into a single log entry. - Set the default log level to
WARNING
.
Added
- An additional
NO_LOG
log level was added to turn off the logging. - New
flag-overrides
configuration option was added to support the reading of flags & settings from a local file or an associative array. - New
getAllValues()
function was added for evaluating all available flags.
v5.3.1
v5.3.0
v5.2.1
v5.2.0
Added two extra client configuration options for logging:
Name | Type | Example | Description |
---|---|---|---|
log-level | int | 'log-level' => \ConfigCat\Log\LogLevel::DEBUG |
Sets the logging severity for the ConfigCat SDK. It must be a value from the constants of the \ConfigCat\Log\LogLevel class. |
exceptions-to-ignore | array | 'exceptions-to-ignore' => [InvalidOperationException::class] |
A list of exception class types that should be excluded from logging. |