Debian Codegraph @

vendor/clue/redis-react/CHANGELOG.md

raw
1 # Changelog
2
3 ## 2.8.0 (2025-01-03)
4
5 This is a compatibility release that contains backported features from the `3.x` branch.
6 Once v3 is released, it will be the way forward for this project.
7
8 * Feature: Improve PHP 8.4+ support by avoiding implicitly nullable types.
9 (#165 and #170 by @clue)
10
11 ## 2.7.0 (2024-01-05)
12
13 This is a compatibility release that contains backported features from the `3.x` branch.
14 Once v3 is released, it will be the way forward for this project.
15
16 * Feature: Forward compatibility with Promise v3.
17 (#152 by @clue)
18
19 * Feature: Full PHP 8.3 compatibility and update test suite.
20 (#151 by @clue)
21
22 ## 2.6.0 (2022-05-09)
23
24 * Feature: Support PHP 8.1 release.
25 (#119 by @clue)
26
27 * Improve documentation and CI configuration.
28 (#123 and #125 by @SimonFrings)
29
30 ## 2.5.0 (2021-08-31)
31
32 * Feature: Simplify usage by supporting new [default loop](https://reactphp.org/event-loop/#loop) and new Socket API.
33 (#114 and #115 by @SimonFrings)
34
35 ```php
36 // old (still supported)
37 $factory = new Clue\React\Redis\Factory($loop);
38
39 // new (using default loop)
40 $factory = new Clue\React\Redis\Factory();
41 ```
42
43 * Feature: Improve error reporting, include Redis URI and socket error codes in all connection errors.
44 (#116 by @clue)
45
46 * Documentation improvements and updated examples.
47 (#117 by @clue, #112 by @Nyholm and #113 by @PaulRotmann)
48
49 * Improve test suite and use GitHub actions for continuous integration (CI).
50 (#111 by @SimonFrings)
51
52 ## 2.4.0 (2020-09-25)
53
54 * Fix: Fix dangling timer when lazy connection closes with pending commands.
55 (#105 by @clue)
56
57 * Improve test suite and add `.gitattributes` to exclude dev files from exports.
58 Prepare PHP 8 support, update to PHPUnit 9 and simplify test matrix.
59 (#96 and #97 by @clue and #99, #101 and #104 by @SimonFrings)
60
61 ## 2.3.0 (2019-03-11)
62
63 * Feature: Add new `createLazyClient()` method to connect only on demand and
64 implement "idle" timeout to close underlying connection when unused.
65 (#87 and #88 by @clue and #82 by @WyriHaximus)
66
67 ```php
68 $client = $factory->createLazyClient('redis://localhost:6379');
69
70 $client->incr('hello');
71 $client->end();
72 ```
73
74 * Feature: Support cancellation of pending connection attempts.
75 (#85 by @clue)
76
77 ```php
78 $promise = $factory->createClient($redisUri);
79
80 $loop->addTimer(3.0, function () use ($promise) {
81 $promise->cancel();
82 });
83 ```
84
85 * Feature: Support connection timeouts.
86 (#86 by @clue)
87
88 ```php
89 $factory->createClient('localhost?timeout=0.5');
90 ```
91
92 * Feature: Improve Exception messages for connection issues.
93 (#89 by @clue)
94
95 ```php
96 $factory->createClient('redis://localhost:6379')->then(
97 function (Client $client) {
98 // client connected (and authenticated)
99 },
100 function (Exception $e) {
101 // an error occurred while trying to connect (or authenticate) client
102 echo $e->getMessage() . PHP_EOL;
103 if ($e->getPrevious()) {
104 echo $e->getPrevious()->getMessage() . PHP_EOL;
105 }
106 }
107 );
108 ```
109
110 * Improve test suite structure and add forward compatibility with PHPUnit 7 and PHPUnit 6
111 and test against PHP 7.1, 7.2, and 7.3 on TravisCI.
112 (#83 by @WyriHaximus and #84 by @clue)
113
114 * Improve documentation and update project homepage.
115 (#81 and #90 by @clue)
116
117 ## 2.2.0 (2018-01-24)
118
119 * Feature: Support communication over Unix domain sockets (UDS)
120 (#70 by @clue)
121
122 ```php
123 // new: now supports redis over Unix domain sockets (UDS)
124 $factory->createClient('redis+unix:///tmp/redis.sock');
125 ```
126
127 ## 2.1.0 (2017-09-25)
128
129 * Feature: Update Socket dependency to support hosts file on all platforms
130 (#66 by @clue)
131
132 This means that connecting to hosts such as `localhost` (and for example
133 those used for Docker containers) will now work as expected across all
134 platforms with no changes required:
135
136 ```php
137 $factory->createClient('localhost');
138 ```
139
140 ## 2.0.0 (2017-09-20)
141
142 A major compatibility release to update this package to support all latest
143 ReactPHP components!
144
145 This update involves a minor BC break due to dropped support for legacy
146 versions. We've tried hard to avoid BC breaks where possible and minimize impact
147 otherwise. We expect that most consumers of this package will actually not be
148 affected by any BC breaks, see below for more details.
149
150 * BC break: Remove all deprecated APIs, default to `redis://` URI scheme
151 and drop legacy SocketClient in favor of new Socket component.
152 (#61 by @clue)
153
154 > All of this affects the `Factory` only, which is mostly considered
155 "advanced usage". If you're affected by this BC break, then it's
156 recommended to first update to the intermediary v1.2.0 release, which
157 allows you to use the `redis://` URI scheme and a standard
158 `ConnectorInterface` and then update to this version without causing a
159 BC break.
160
161 * BC break: Remove uneeded `data` event and support for advanced `MONITOR`
162 command for performance and consistency reasons and
163 remove underdocumented `isBusy()` method.
164 (#62, #63 and #64 by @clue)
165
166 * Feature: Forward compatibility with upcoming Socket v1.0 and v0.8 and EventLoop v1.0 and Evenement v3
167 (#65 by @clue)
168
169 ## 1.2.0 (2017-09-19)
170
171 * Feature: Support `redis[s]://` URI scheme and deprecate legacy URIs
172 (#60 by @clue)
173
174 ```php
175 $factory->createClient('redis://:secret@localhost:6379/4');
176 $factory->createClient('redis://localhost:6379?password=secret&db=4');
177 ```
178
179 * Feature: Factory accepts Connector from Socket and deprecate legacy SocketClient
180 (#59 by @clue)
181
182 If you need custom connector settings (DNS resolution, TLS parameters, timeouts,
183 proxy servers etc.), you can explicitly pass a custom instance of the
184 [`ConnectorInterface`](https://github.com/reactphp/socket#connectorinterface):
185
186 ```php
187 $connector = new \React\Socket\Connector($loop, array(
188 'dns' => '127.0.0.1',
189 'tcp' => array(
190 'bindto' => '192.168.10.1:0'
191 ),
192 'tls' => array(
193 'verify_peer' => false,
194 'verify_peer_name' => false
195 )
196 ));
197
198 $factory = new Factory($loop, $connector);
199 ```
200
201 ## 1.1.0 (2017-09-18)
202
203 * Feature: Update SocketClient dependency to latest version
204 (#58 by @clue)
205
206 * Improve test suite by adding PHPUnit to require-dev,
207 fix HHVM build for now again and ignore future HHVM build errors,
208 lock Travis distro so new defaults will not break the build and
209 skip functional integration tests by default
210 (#52, #53, #56 and #57 by @clue)
211
212 ## 1.0.0 (2016-05-20)
213
214 * First stable release, now following SemVer
215
216 * BC break: Consistent public API, mark internal APIs as such
217 (#38 by @clue)
218
219 ```php
220 // old
221 $client->on('data', function (MessageInterface $message, Client $client) {
222 // process an incoming message (raw message object)
223 });
224
225 // new
226 $client->on('data', function (MessageInterface $message) use ($client) {
227 // process an incoming message (raw message object)
228 });
229 ```
230
231 > Contains no other changes, so it's actually fully compatible with the v0.5.2 release.
232
233 ## 0.5.2 (2016-05-20)
234
235 * Fix: Do not send empty SELECT statement when no database has been given
236 (#35, #36 by @clue)
237
238 * Improve documentation, update dependencies and add first class support for PHP 7
239
240 ## 0.5.1 (2015-01-12)
241
242 * Fix: Fix compatibility with react/promise v2.0 for monitor and PubSub commands.
243 (#28)
244
245 ## 0.5.0 (2014-11-12)
246
247 * Feature: Support PubSub commands (P)(UN)SUBSCRIBE and watching for "message",
248 "subscribe" and "unsubscribe" events
249 (#24)
250
251 * Feature: Support MONITOR command and watching for "monitor" events
252 (#23)
253
254 * Improve documentation, update locked dependencies and add first class support for HHVM
255 (#25, #26 and others)
256
257 ## 0.4.0 (2014-08-25)
258
259 * BC break: The `Client` class has been renamed to `StreamingClient`.
260 Added new `Client` interface.
261 (#18 and #19)
262
263 * BC break: Rename `message` event to `data`.
264 (#21)
265
266 * BC break: The `Factory` now accepts a `LoopInterface` as first argument.
267 (#22)
268
269 * Fix: The `close` event will be emitted once when invoking the `Client::close()`
270 method or when the underlying stream closes.
271 (#20)
272
273 * Refactored code, improved testability, extended test suite and better code coverage.
274 (#11, #18 and #20)
275
276 > Note: This is an intermediary release to ease upgrading to the imminent v0.5 release.
277
278 ## 0.3.0 (2014-05-31)
279
280 * First tagged release
281
282 > Note: Starts at v0.3 because previous versions were not tagged. Leaving some
283 > room in case they're going to be needed in the future.
284
285 ## 0.0.0 (2013-07-05)
286
287 * Initial concept