NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #4771 most downloaded on Packagist
Optimizely PHP SDK for Optimizely Feature Experimentation, Optimizely Full Stack (legacy), and Optimizely Rollouts
Latest stable
4.0.4
Last release 1 months ago
15 Oct 2026
Release timing varies
gaps range from 2 weeks to 1.3 years
Nearly every release is documented
notes for 38 of 38 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
39 releases · first in 2016
Drag across the ruler to compare, or tap a release to open it.
[FSSDK-13266] Update dependency constraints for json-schema and murmurhash by Tamara Barum (@Tamara-Barum) in #298
Full Changelog: 4.0.3...4.0.4
Full Changelog: https://github.com/optimizely/php-sdk/compare/4.0.3...4.0.4
October 15, 2026
justinrainbow/json-schema v6.x #298lastguest/murmurhash v2.x; bucketing supports both the v1 and v2 APIs with identical results #298Your coding agent can read these notes before it upgrades. Set up the MCP server →
[FSSDK-12316] [Security] Fix curl|bash vulnerability in SourceClear scan by Tamara Barum (@Tamara-Barum) in #294
Full Changelog: 4.0.2...4.0.3
Full Changelog: https://github.com/optimizely/php-sdk/compare/4.0.2...4.0.3
May 20, 2026
[FSSDK-10665] fix: Github Actions YAML files vulnerable to script injections corrected in #287
Full Changelog: 4.0.1...4.0.2
Full Changelog: https://github.com/optimizely/php-sdk/compare/4.0.1...4.0.2
March 14, 2025
[FSSDK-9573] Fix: Deprecation warning by Mike Chu (@mikechu-optimizely) in #279
Full Changelog: 4.0.0...4.0.1
Full Changelog: https://github.com/optimizely/php-sdk/compare/4.0.0...4.0.1
December 4, 2023
Provided support for PHP version 8.x.
June 12, 2023
Update EventBuilder.php Update EventBuilderTest.php Update CHANGELOG.md
Update EventBuilder.php
Update EventBuilderTest.php
Update CHANGELOG.md
We have made changes to avoid unnecessary deprecation notices and fixed some incorrect return hints. (#265).
March 29 , 2023
We updated our README.md and other non-functional code to reflect that this SDK supports both Optimizely Feature Experimentation and Optimizely Full S
March 13, 2023
String type casting added to avoid deprecation notices when passing null to strlen.
October 5th, 2022
Since php 8.1 internal functions are using proper return types. This results in deprecation notices for some of the methods. To suppress the notice fo…
May 31st, 2022
Since php 8.1 internal functions are using proper return types. This results in deprecation notices for some of the methods. To suppress the notice for php8.1+ the new ReturnTypeWillChange attribute is added to the method in question. (#242)
In HTTPProjectConfigManager fetchDatafile function datafile should be a string. So it is fixed by using ->getContents() which returns string. (#243, #247)
Return type should be ProjectConfigInterface when calling createProjectConfigFromDatafile method. (#249)
Add a set of new APIs for overriding and managing user-level flag, experiment and delivery rule decisions. These methods can be used for QA and automa
January 10th, 2022
monolog/monolog and guzzlehttp/guzzle (#235).OptimizelyFeature.experimentsMap of OptimizelyConfig is deprecated as of this release. Please use OptimizelyFeature.experimentRules and OptimizelyFeat…
September 16th, 2021
OptimizelyConfig. (#230)
OptimizelyFeatureOptimizelyExperimentOptimizelyFeature.experimentsMap of OptimizelyConfig is deprecated as of this release. Please use OptimizelyFeature.experimentRules and OptimizelyFeature.deliveryRules. (#230)Fixed duplicate experiment key issue with multiple feature flags. While trying to get variation from the variationKeyMap, it was unable to find becaus
August 4th, 2021
Introducing a new primary interface for retrieving feature flag status, configuration and associated experiment decisions for users (#220, #224). The
February 17th, 2021
Introducing a new primary interface for retrieving feature flag status, configuration and associated experiment decisions for users (#220, #224). The new OptimizelyUserContext class is instantiated with createUserContext and exposes the following APIs to get OptimizelyDecision:
For details, refer to our documentation page: https://docs.developers.optimizely.com/full-stack/v4.0/docs/php-sdk.
Added "enabled" field to decision metadata structure. #217
Added support for upcoming application-controlled introduction of tracking for non-experiment Flag decisions. #215
November 2nd, 2020
Version targeting using semantic version syntax. #213
Introduced 2 APIs to interact with feature variables:
July 8th, 2020
getFeatureVariableJSON allows you to get value for JSON variables related to a feature.getAllFeatureVariables gets values for all variables under a feature.HTTPProjectConfigManager now accepts datafileAccessToken to be able to fetch datafiles belonging to secure environments.This release adds an SDK key param to Optimizely constructor. The user can now create an Optimizely instance only using an SDK key. Previously the use
Added a new API to get project configuration static data.
January 27th, 2020
getOptimizelyConfig() to get a snapshot of project configuration static data.OptimizelyConfig instance which includes a datafile revision number, all experiments, and feature flags mapped by their key values.Added support for datafile management via HTTPProjectConfigManager:
August 28th, 2019
$configManager = new HTTPProjectConfigManager(<<SDK_KEY>>);
$optimizely = new Optimizely(<<DATAFILE>>, null, null, null, false, null, $configManager);
fetch method allows you to refresh the config. In order to update the config, you can do something like:$configManager->fetch();
August 28th, 2019
$configManager = new HTTPProjectConfigManager(<<SDK_KEY>>);
$optimizely = new Optimizely(<<DATAFILE>>, null, null, null, false, null, $configManager);
fetch method allows you to refresh the config. In order to update the config, you can do something like:$configManager->fetch();
OPTIMIZELY_CONFIG_UPDATE notification listener.Activate notification listener is deprecated as of this release. Recommendation is to use the new Decision notification listener. Activate notificatio…
May 3rd, 2019
## 3.0.1 April 19th, 2019 ### Security Fix: * Removed CurlEventDispatcher. (#168) - ID: opt-2019-0001 - Overall CVSSv3: 6.0 - Optimizely Severity: Hig
April 19th, 2019
They're now called clearNotificationListeners and clearAllNotificationListeners, respectively. The original methods are now deprecated and will be dro…
March 6th, 2019
The 3.0 release improves event tracking and supports additional audience targeting functionality.
track method now dispatches its conversion event unconditionally, without first determining whether the user is targeted by a known experiment that uses the event. This may increase outbound network traffic.exists matcher that passes if the user has a non-null value for the targeted user attribute and fails otherwise.substring matcher that resolves if the user has a string value for the targeted attribute.gt (greater than) and lt (less than) matchers that resolve if the user has a valid number value for the targeted attribute. A valid number is a finite float or int in the inclusive range [-2⁵³, 2⁵³].exact) matcher can now be used to target booleans and valid numbers, not just strings."and" and "not" operators, not just the "or" operator.clearNotifications and cleanAllNotifications methods. They're now called clearNotificationListeners and clearAllNotificationListeners, respectively. The original methods are now deprecated and will be dropped in a future release. (#120)exists matcher) no longer resolve to false when they fail to find an legitimate value for the targeted user attribute. The result remains null (unknown). Therefore, an audience that negates such a condition (using the "not" operator) can no longer resolve to true unless there is an unrelated branch in the condition tree that itself resolves to true.fix(generateBucketValue): Avoid negative bucket number for PHP x86.
feat(isValid): Adds getter to access isValid attribute.
See Changelog
See Changelog
June 29th, 2018
See Changelog
See Changelog
June 19th, 2018
See Changelog
See Changelog
April 12th, 2018
This major release introduces APIs for Feature Management. It also introduces some breaking changes listed below.
isFeatureEnabled API to determine whether to show a feature to a user or not.$isEnabled = $optimizelyClient->isFeatureEnabled('my_feature_key', 'my_user', $userAttributes);
$enabledFeatures = $optimizelyClient->getEnabledFeatures('my_user', $userAttributes);
String, Integer, Double, Boolean.$stringVariable = $optimizelyClient->getFeatureVariableString('my_feature_key', 'string_variable_key', 'my_user');
$integerVariable = $optimizelyClient->getFeatureVariableInteger('my_feature_key', 'integer_variable_key', 'my_user');
$doubleVariable = $optimizelyClient->getFeatureVariableDouble('my_feature_key', 'double_variable_key', 'my_user');
$booleanVariable = $optimizelyClient->getFeatureVariableBoolean('my_feature_key', 'boolean_variable_key', 'my_user');
track API with revenue value as a stand-alone parameter has been removed. The revenue value should be passed in as an entry in the event tags dict. The key for the revenue tag is revenue and the passed in value will be treated by Optimizely as the value for computing results.$eventTags = ['revenue' => 4200];
$optimizelyClient->track('event_key', 'user_id', $userAttributes, $eventTags);
See Changelog.
See Changelog.
May 29th, 2018
This beta release introduces APIs for Feature Management. It also introduces some breaking changes listed below.
isFeatureEnabled API to determine whether to show a feature to a user or not.$isEnabled = $optimizelyClient->isFeatureEnabled('my_feature_key', 'my_user', $userAttributes);
$enabledFeatures = $optimizelyClient->getEnabledFeatures('my_user', $userAttributes);
String, Integer, Double, Boolean.$stringVariable = $optimizelyClient->getFeatureVariableString('my_feature_key', 'string_variable_key', 'my_user');
$integerVariable = $optimizelyClient->getFeatureVariableInteger('my_feature_key', 'integer_variable_key', 'my_user');
$doubleVariable = $optimizelyClient->getFeatureVariableDouble('my_feature_key', 'double_variable_key', 'my_user');
$booleanVariable = $optimizelyClient->getFeatureVariableBoolean('my_feature_key', 'boolean_variable_key', 'my_user');
track API with revenue value as a stand-alone parameter has been removed. The revenue value should be passed in as an entry in the event tags dict. The key for the revenue tag is revenue and the passed in value will be treated by Optimizely as the value for computing results.$eventTags = ['revenue' => 4200];
$optimizelyClient->track('event_key', 'user_id', $userAttributes, $eventTags);
Added support for notification listeners.
Added support for Numeric Metrics.
See Changelog.
See Changelog.
/**
* Force a user into a variation for a given experiment.
*
* @param $experimentKey string Key identifying the experiment.
* @param $userId string The user ID to be used for bucketing.
* @param $variationKey string The variation key specifies the variation which the user
* will be forced into. If null, then clear the existing experiment-to-variation mapping.
*
* @return boolean A boolean value that indicates if the set completed successfully.
*/
public function setForcedVariation($experimentKey, $userId, $variationKey);
/**
* Gets the forced variation for a given user and experiment.
*
* @param $experimentKey string Key identifying the experiment.
* @param $userId string The user ID to be used for bucketing.
*
* @return string|null The forced variation key.
*/
public function getForcedVariation($experimentKey, $userId);
See Changelog.
See Changelog.
See Changelog.
See Changelog.
See Changelog.
eventValue parameter from the track method. Should use eventTags to pass in event value instead.See Changelog.
See Changelog.
General release of Optimizely X Full Stack PHP SDK.
General release of Optimizely X Full Stack PHP SDK.
Beta release of PHP SDK for managing Full Stack projects.
Beta release of PHP SDK for managing Full Stack projects.
One column per quarter.