NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist · #4478 most downloaded on Packagist
Optimizely PHP SDK for Optimizely Feature Experimentation, Optimizely Full Stack (legacy), and Optimizely Rollouts
Last release 4 months ago
20 May 2026
Release timing varies
gaps range from 2 weeks to 1.3 years
Nearly every release is documented
notes for 37 of 37 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
38 releases · first in 2016
[FSSDK-12316] [Security] Fix curl|bash vulnerability in SourceClear scan by @Tamara-Barum in #294
Full Changelog: 4.0.2...4.0.3
May 20, 2026
One column per quarter.
[FSSDK-10665] fix: Github Actions YAML files vulnerable to script injections corrected in #287
Full Changelog: 4.0.1...4.0.2
[FSSDK-9573] Fix: Deprecation warning by @mikechu-optimizely in #279
Full Changelog: 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();
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
April 19th, 2019 ### Security Fix: * Removed CurlEventDispatcher. (#168) - ID: opt-2019-0001 - Overall CVSSv3: 6.0 - Optimizely Severity: High
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.
Introduces support for bot filtering (#110).
June 29th, 2018
Fix: send impression event for Feature Test when Feature is disabled (#114).
June 19th, 2018
This major release introduces APIs for Feature Management. It also introduces some breaking changes listed below.
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);
This beta release introduces APIs for Feature Management. It also introduces some breaking changes listed below.
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.
Added the forced bucketing feature, which allows customers to force users into variations in real time for QA purposes without requiring datafile down
/**
* 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);
- Add user profile service.
Updated datafile parsing to be able to handle additional fields.
Deprecated the eventValue parameter from the track method. Should use eventTags to pass in event value instead.
eventValue parameter from the track method. Should use eventTags to pass in event value instead.Updated to support more versions of json-schema package.
General release of Optimizely X Full Stack PHP SDK. No breaking changes from previous version.
Beta release of the Optimizely X Full Stack PHP SDK.
Your coding agent can read these notes before it upgrades. Set up the MCP server →