You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+61-2Lines changed: 61 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,65 @@
1
1
# Change log
2
2
3
-
All notable changes to the LaunchDarkly Java SDK will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org).
3
+
All notable changes to the LaunchDarkly PHP SDK will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org).
4
+
5
+
## [2.3.0] - 2017-10-06
6
+
### Added
7
+
- New `flush` method forces events to be published to the LaunchDarkly service. This can be useful if `LDClient` is not automatically destroyed at the end of a request. Thanks @foxted!
8
+
9
+
## [2.2.0] - 2017-06-06
10
+
### Added
11
+
- Support for [publishing events via ld-relay](README.md#using-ld-relay)
12
+
- Allow `EventPublisher` to be injected into the client.
13
+
-`GuzzleEventPublisher` as a synchronous, in-process alternative to publishing events via background processes.
14
+
- Allow the `curl` path used by `CurlEventPublisher` to be customized via the `curl` option to `LDClient`. Thanks @abacaphiliac!
15
+
16
+
## [2.1.2] - 2017-04-27
17
+
### Changed
18
+
- Added package suggestions in `composer.json`.
19
+
20
+
### Fixed
21
+
- Better handling of possibly null variations. Thanks @idirouhab!
22
+
23
+
## [2.1.1] - 2017-04-11
24
+
### Changed
25
+
- Better handling of possibly null targets. Thanks @idirouhab!
26
+
- Better handling of possibly null rules.
27
+
28
+
## [2.1.0] - 2017-03-23
29
+
### Changed
30
+
- Allow FeatureRequester to be injected into the client. Thanks @abacaphiliac!
31
+
- Allow Predis\Client to be overriden in LDDFeatureRequester. Thanks @abacaphiliac!
32
+
- Use logger interface method instead of Monolog method. Thanks @abacaphiliac!
33
+
- Improve type hinting for default. Thanks @jdrieghe!
34
+
35
+
## [2.0.7] - 2017-03-03
36
+
### Changed
37
+
- Removed warning when calling `allFlags` via `LDDFeatureRequester`
38
+
- Removed warning when a feature flag's prerequisites happen to be null
39
+
40
+
## [2.0.6] - 2017-02-07
41
+
### Changed
42
+
- Use minimum versions in composer.json
43
+
44
+
## [2.0.5] - 2017-02-03
45
+
### Changed
46
+
- Made Monolog dependency version less strict
47
+
48
+
## [2.0.4] - 2017-01-26
49
+
### Changed
50
+
- Made Composer requirements less strict
51
+
52
+
## [2.0.3] - 2017-01-05
53
+
### Changed
54
+
- Fixed botched 2.0.2 release: Better handling of null vs false when evaluating.
55
+
56
+
## [2.0.2] - 2017-01-04
57
+
### Changed
58
+
- Better handling of null vs false when evaluating.
59
+
60
+
## [2.0.1] - 2016-11-09
61
+
### Added
62
+
- Monolog is now a required dependency
4
63
5
64
## [2.0.0] - 2016-08-08
6
65
### Added
@@ -15,4 +74,4 @@ All notable changes to the LaunchDarkly Java SDK will be documented in this file
15
74
- The `toggle` call has been deprecated in favor of `variation`.
1. After installing, require Composer's autoloader:
18
21
19
22
require 'vendor/autoload.php';
20
23
21
-
2. Create a new LDClient with your SDK key:
24
+
1. Create a new LDClient with your SDK key:
22
25
23
26
$client = new LaunchDarkly\LDClient("your_sdk_key");
24
27
@@ -39,42 +42,66 @@ Your first feature flag
39
42
Fetching flags
40
43
--------------
41
44
42
-
There are two approaches to fetching the flag rules from LaunchDarkly:
45
+
There are two distinct methods of integrating LaunchDarkly in a PHP environment.
46
+
47
+
*[Guzzle](https://github.com/launchdarkly/guzzle3) with its [cache plugin](https://github.com/launchdarkly/guzzle3/blob/master/docs/plugins/cache-plugin.rst) to request and cache HTTP responses in an in-memory array (default) -- note, this is a forked older version of Guzzle for PHP 5.3 compatibility
48
+
*[ld-relay](https://github.com/launchdarkly/ld-relay) to retrieve and store flags in Redis (recommended)
43
49
44
-
* Making HTTP requests (using Guzzle)
45
-
* Setting up the [ld-daemon](https://github.com/launchdarkly/ld-daemon) to store the flags in Redis
50
+
We strongly recommend using the ld-relay. Per-flag caching (Guzzle method) is only intended for low-throughput environments.
46
51
47
52
Using Guzzle
48
53
============
49
54
50
-
To use Guzzle it must be required as a dependency:
It will then be used as the default way of fetching flags.
56
60
57
-
Using Redis
58
-
===========
61
+
With Guzzle, you could persist your cache somewhere other than the default in-memory store, like Memcached or Redis. You could then specify your cache when initializing the client with the [cache option](https://github.com/launchdarkly/php-client/blob/master/src/LaunchDarkly/LDClient.php#L44).
59
62
60
-
1. Require Predis as a dependency:
63
+
$client = new LaunchDarkly\LDClient("YOUR_SDK_KEY", array("cache_storage" => $cacheStorage));
61
64
62
-
php composer.phar require "predis/predis:1.0.*"
65
+
Using LD-Relay
66
+
==============
63
67
64
-
2. Create the LDClient with the Redis feature requester as an option:
68
+
The LaunchDarkly Relay Proxy ([ld-relay](https://github.com/launchdarkly/ld-relay)) consumes the LaunchDarkly streaming API and can update
69
+
a Redis cache operating in your production environment. The ld-relay offers many benefits such as performance and feature flag consistency. With PHP applications, we strongly recommend setting up ld-relay with a Redis store.
65
70
66
-
$client = new LaunchDarkly\LDClient("your_sdk_key", ['feature_requester_class' => 'LaunchDarkly\LDDFeatureRequester']);
71
+
1. Set up ld-relay in [daemon-mode](https://github.com/launchdarkly/ld-relay#redis-storage-and-daemon-mode) with Redis
67
72
68
-
Learn more
69
-
-----------
73
+
2. Require Predis as a dependency:
70
74
71
-
Check out our [documentation](http://docs.launchdarkly.com) for in-depth instructions on configuring and using LaunchDarkly. You can also head straight to the [complete reference guide for this SDK](http://docs.launchdarkly.com/docs/php-sdk-reference).
75
+
php composer.phar require "predis/predis:1.0.*"
76
+
77
+
3. Create the LDClient with the Redis feature requester as an option:
78
+
79
+
$client = new LaunchDarkly\LDClient("your_sdk_key", [
4. If ld-relay is configured for [event forwarding](https://github.com/launchdarkly/ld-relay#event-forwarding), you can configure the LDClient to publish events to ld-relay instead of directly to `events.launchdarkly.com`. Using `GuzzleEventPublisher` with ld-relay event forwarding can be an efficient alternative to the default `curl`-based event publishing.
86
+
87
+
$client = new LaunchDarkly\LDClient("your_sdk_key", [
We run integration tests for all our SDKs using a centralized test harness. This approach gives us the ability to test for consistency across SDKs, as well as test networking behavior in a long-running application. These tests cover each method in the SDK, and verify that event sending, flag evaluation, stream reconnection, and other aspects of the SDK all behave correctly.
77
99
100
+
Learn more
101
+
-----------
102
+
103
+
Check out our [documentation](http://docs.launchdarkly.com) for in-depth instructions on configuring and using LaunchDarkly. You can also head straight to the [complete reference guide for this SDK](http://docs.launchdarkly.com/docs/php-sdk-reference).
104
+
78
105
Contributing
79
106
------------
80
107
@@ -90,19 +117,19 @@ About LaunchDarkly
90
117
* Grant access to certain features based on user attributes, like payment plan (eg: users on the ‘gold’ plan get access to more features than users in the ‘silver’ plan). Disable parts of your application to facilitate maintenance, without taking everything offline.
0 commit comments