Skip to content

PHP SDK 4.0.0

Choose a tag to compare

@Kameleoon Kameleoon released this 22 Nov 03:37
· 43 commits to main since this release

Breaking changes

  • Removed all methods and exceptions related to experiments:
    • triggerExperiment
    • getVariationAssociatedData (obtainVariationAssociatedData)
    • getExperimentList
    • getExperimentListForVisitor
    • ExperimentConfigurationNotFound
    • NotTargeted
    • NotAllocated
  • Removed methods that were deprecated in 3.x versions:
    • activateFeature
    • obtainVisitorCode
    • retrieveDataFromRemoteSource
  • Renamed classes, methods and exceptions:
    • getFeatureAllVariables to getFeatureVariationVariables
    • ConfigurationNotLoaded to DataFileInvalid
    • CredentialsNotFound to ConfigCredentialsInvalid
    • FeatureConfigurationNotFound to FeatureNotFound
    • VariationConfigurationNotFound to FeatureVariationNotFound
    • VisitorCodeNotValid to VisitorCodeInvalid
  • Changes in external configuration file:
    • renamed actions_configuration_refresh_interval to refresh_interval_minute
    • renamed default_timeout to default_timeout_millisecond
  • Added new exception [SiteCodeIsEmpty] for method KameleoonClientFactory::create indicating that the provided sitecode is empty.
  • Added new exception [FeatureEnvironmentDisabled] indicating that the feature flag is disabled for certain environments. The following methods can throw the new exception:
  • A new exception, DataFileInvalid, is thrown when the configuration has not been initialized. A missing configuration prevents the SDK from functioning properly. The DataFileInvalid exception can be thrown by the following methods:
  • Removed topLevelDomain parameter from getVisitorCode. It should be provided with KameleoonClientConfig or via configuration file.

Features

  • Added KameleoonClientConfig, which can be used as parameter during initialization of a client in new method KameleoonClientFactory::createWithConfig
  • Added setLegalConsent method to determine the types data Kameleoon includes in tracking requests. This helps you adhere to legal and regulatory requirements while responsibly managing visitor data. You can find more information in the Consent management policy.

Bug fixes

  • Fixed an issue where using debug mode would result in a "Error: Uncaught TypeError: rawurlencode() expects parameter 1 to be string, null given" error message whenever the $_SERVER["HTTP_USER_AGENT"] environment variable wasn't set.