Skip to content

Commit c0123f6

Browse files
authored
Bump to 2.0 for General Availability. (#104)
1 parent bf1c5b2 commit c0123f6

File tree

4 files changed

+37
-2
lines changed

4 files changed

+37
-2
lines changed

CHANGELOG.md

+32
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,35 @@
1+
## 2.0.0
2+
April 12th, 2018
3+
4+
This major release introduces APIs for Feature Management. It also introduces some breaking changes listed below.
5+
6+
### New Features
7+
- Introduced the `isFeatureEnabled` API to determine whether to show a feature to a user or not.
8+
```
9+
$isEnabled = $optimizelyClient->isFeatureEnabled('my_feature_key', 'my_user', $userAttributes);
10+
```
11+
12+
- You can also get all the enabled features for the user by calling:
13+
```
14+
$enabledFeatures = $optimizelyClient->getEnabledFeatures('my_user', $userAttributes);
15+
```
16+
17+
- Introduced Feature Variables to configure or parameterize a feature. There are four variable types: `String`, `Integer`, `Double`, `Boolean`.
18+
```
19+
$stringVariable = $optimizelyClient->getFeatureVariableString('my_feature_key', 'string_variable_key', 'my_user');
20+
$integerVariable = $optimizelyClient->getFeatureVariableInteger('my_feature_key', 'integer_variable_key', 'my_user');
21+
$doubleVariable = $optimizelyClient->getFeatureVariableDouble('my_feature_key', 'double_variable_key', 'my_user');
22+
$booleanVariable = $optimizelyClient->getFeatureVariableBoolean('my_feature_key', 'boolean_variable_key', 'my_user');
23+
```
24+
25+
### Breaking changes
26+
- The `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.
27+
```
28+
$eventTags = ['revenue' => 4200];
29+
30+
$optimizelyClient->track('event_key', 'user_id', $userAttributes, $eventTags);
31+
```
32+
133
## 2.0.0-beta1
234
May 29th, 2018
335

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ The Optimizely PHP SDK can be installed through [Composer](https://getcomposer.o
1616
php composer.phar require optimizely/optimizely-sdk
1717
```
1818

19+
### Feature Management Access
20+
To access the Feature Management configuration in the Optimizely dashboard, please contact your Optimizely account executive.
21+
1922
### Using the SDK
2023
See the Optimizely Full Stack [developer documentation](https://developers.optimizely.com/x/solutions/sdks/reference/?language=php) to learn how to set up your first Full Stack project and use the SDK.
2124

src/Optimizely/Event/Builder/EventBuilder.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class EventBuilder
3737
/**
3838
* @const string Version of the Optimizely PHP SDK.
3939
*/
40-
const SDK_VERSION = '2.0.0-beta1';
40+
const SDK_VERSION = '2.0.0';
4141

4242
/**
4343
* @var string URL to send event to.

tests/EventTests/EventBuilderTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function setUp()
6868
]],
6969
'revision' => '15',
7070
'client_name' => 'php-sdk',
71-
'client_version' => '2.0.0-beta1',
71+
'client_version' => '2.0.0',
7272
'anonymize_ip'=> false,
7373
];
7474
$this->expectedEventHttpVerb = 'POST';

0 commit comments

Comments
 (0)