Skip to content

Releases: configcat/php-sdk

v9.2.0

13 May 09:16
Compare
Choose a tag to compare

Removed

  • Support for Guzzle v6 due to switching to PSR-18 ClientInterface, which is only supported in Guzzle v7. #49

v9.1.1

15 Apr 14:57
eca206b
Compare
Choose a tag to compare

Added

  • In-memory cache layer to custom cache implementations.
  • Coverage report upload to SonarCloud.

v9.1.0

25 Mar 13:03
ee8c833
Compare
Choose a tag to compare

New features and improvements:

  • When an error occurs and there is a related Throwable object, pass it to the onError hook handlers. (#46)
  • When forceRefresh fails and there is a related Throwable object, expose it in RefreshResult via the new getErrorException property.
  • Handle unexpected errors in the forceRefresh method (to stop potential unhandled exceptions thrown by the evaluation logic from bringing down the consumer's application).

Breaking changes:

  • Rename the getError property to getErrorMessage in RefreshResult. (Low impact expected.)
  • Add an extra parameter of type ?Throwable to the onError hook handlers. (Low impact expected.)
  • Don't include event_id in the log message but leave it up to the actual logger implementation to choose the log message format. (Affects consumers using custom logging only.)

v9.0.0

04 Mar 12:52
60f4f5e
Compare
Choose a tag to compare

New features and improvements:

  • Add support for the new Config JSON v6 format: update the config model and implement new features in setting evaluation logic. (#44)
  • Overhaul setting evaluation-related logging and make it consistent across SDKs.
  • Improve consistency of config JSON deserialization error reporting.
  • Add exception message and stack trace to the log format of the default logger.
  • When evaluation fails and there is a related Throwable object, expose it in EvaluationDetails via the new getErrorException property.
  • Performance improvements to setting evaluation (building of evaluation log is expensive, so it is skipped when info level logging is turned off).

Bug fixes:

  • Fix inconsistent logging of error 1000 in the case of flag overrides.

Breaking changes (listed in the order of expected impact):

  • Rename the getError property to getErrorMessage in EvaluationDetails.
  • Rename the getMatchedEvaluationRule property to getMatchedTargetingRule and the getMatchedEvaluationPercentageRule property to getMatchedPercentageOption in EvaluationDetails.
  • Move config JSON attribute descriptor classes from the ConfigCat\Attributes to the ConfigCat\ConfigJson namespace and update them to support config JSON schema v6.

v8.1.0

28 Sep 13:59
d4937f5
Compare
Choose a tag to compare

Added

  • Ability to override the default Guzzle HTTP client with a custom one:

    • The user has to implement the \ConfigCat\Http\FetchClientInterface to give the SDK a custom \Psr\Http\Client\ClientInterface implementation.
      namespace ConfigCat\Http;
      
      interface FetchClientInterface
      {
          public function getClient(): \Psr\Http\Client\ClientInterface;
          public function createRequest(string $method, string $uri): \Psr\Http\Message\RequestInterface;
      }
    • There's a new \ConfigCat\ClientOptions::FETCH_CLIENT configuration option where the SDK accepts a custom \ConfigCat\Http\FetchClientInterface implementation. This option defaults to \ConfigCat\Http\GuzzleFetchClient.
    • The Guzzle specific \ConfigCat\ClientOptions::REQUEST_OPTIONS and \ConfigCat\ClientOptions::CUSTOM_HANDLER configuration options have been marked as deprecated. Options for Guzzle are available through the \ConfigCat\Http\GuzzleFetchClient::create() method:
      $client = new \ConfigCat\ConfigCatClient('<SDK-KEY>', [
           \ConfigCat\ClientOptions::FETCH_CLIENT => \ConfigCat\Http\GuzzleFetchClient::create([
               \GuzzleHttp\RequestOptions::CONNECT_TIMEOUT => 5,
           ]),
       ]);
    • The direct dependency to guzzlehttp/guzzle was not removed yet due to minor upgrade backward compatibility. It can be moved to suggest at the next major version bump.
  • php-cs-fixer linter and phpstan static analyzer to the CI workflow. The whole project was reformatted and analyzed, this is why this PR is bigger than usual.

Removed

  • Dependency to Monolog. It was replaced by a simple default logger that writes to error_log(). It's still replaceable with any psr/log implementation.

v8.0.0

28 Aug 16:27
374996f
Compare
Choose a tag to compare

Changed

  • Standardized config cache key generation algorithm and cache payload format to allow shared caches to be used by SDKs of different platforms.
  • getFetchTimeUnixSeconds() getter of EvaluationDetails was renamed to getFetchTimeUnixMilliseconds() and now returns the fetch time in float Unix milliseconds.

Removed

  • getVariationId() / getAllVariationIds() methods. Alternative: getValueDetails() / getAllValueDetails()

v7.1.1

20 Jun 09:15
Compare
Choose a tag to compare

Fixed

  • Wrong return value of getValueDetails() if a non-existent flag was requested.

v7.1.0

08 Jun 16:36
Compare
Choose a tag to compare

Fixed

  • The URL passed via the BASE-URL option was always overridden by the CDN URL from the downloaded config.json.

v7.0.1

29 Mar 20:31
Compare
Choose a tag to compare
  • Fixed monolog dependency version for #29
  • Fixed reported SDK version in X-ConfigCat-UserAgent HTTP header.

v7.0.0

15 Mar 01:31
146a236
Compare
Choose a tag to compare
  • Changed the minimum required PHP version to 8.1. Support for PHP 7 is still maintained here.
  • Deprecated getVariationId() and getAllVariationIds() methods in favor of getValueDetails() and getAllValueDetails().