Skip to content

Commit 426e9df

Browse files
committed
Prepare v2.3.0 release
1 parent dc2dcff commit 426e9df

File tree

2 files changed

+70
-10
lines changed

2 files changed

+70
-10
lines changed

CHANGELOG.md

+56
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,61 @@
11
# Changelog
22

3+
## 2.3.0 (2019-03-11)
4+
5+
* Feature: Add new `createLazyClient()` method to connect only on demand and
6+
implement "idle" timeout to close underlying connection when unused.
7+
(#87 and #88 by @clue and #82 by @WyriHaximus)
8+
9+
```php
10+
$client = $factory->createLazyClient('redis://localhost:6379');
11+
12+
$client->incr('hello');
13+
$client->end();
14+
```
15+
16+
* Feature: Support cancellation of pending connection attempts.
17+
(#85 by @clue)
18+
19+
```php
20+
$promise = $factory->createClient($redisUri);
21+
22+
$loop->addTimer(3.0, function () use ($promise) {
23+
$promise->cancel();
24+
});
25+
```
26+
27+
* Feature: Support connection timeouts.
28+
(#86 by @clue)
29+
30+
```php
31+
$factory->createClient('localhost?timeout=0.5');
32+
```
33+
34+
* Feature: Improve Exception messages for connection issues.
35+
(#89 by @clue)
36+
37+
```php
38+
$factory->createClient('redis://localhost:6379')->then(
39+
function (Client $client) {
40+
// client connected (and authenticated)
41+
},
42+
function (Exception $e) {
43+
// an error occurred while trying to connect (or authenticate) client
44+
echo $e->getMessage() . PHP_EOL;
45+
if ($e->getPrevious()) {
46+
echo $e->getPrevious()->getMessage() . PHP_EOL;
47+
}
48+
}
49+
);
50+
```
51+
52+
* Improve test suite structure and add forward compatibility with PHPUnit 7 and PHPUnit 6
53+
and test against PHP 7.1, 7.2, and 7.3 on TravisCI.
54+
(#83 by @WyriHaximus and #84 by @clue)
55+
56+
* Improve documentation and update project homepage.
57+
(#81 and #90 by @clue)
58+
359
## 2.2.0 (2018-01-24)
460

561
* Feature: Support communication over Unix domain sockets (UDS)

README.md

+14-10
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# clue/reactphp-redis [![Build Status](https://travis-ci.org/clue/reactphp-redis.svg?branch=master)](https://travis-ci.org/clue/reactphp-redis)
22

3-
Async [Redis](http://redis.io/) client implementation, built on top of [ReactPHP](http://reactphp.org/).
3+
Async [Redis](https://redis.io/) client implementation, built on top of [ReactPHP](https://reactphp.org/).
44

5-
[Redis](http://redis.io/) is an open source, advanced, in-memory key-value database.
5+
[Redis](https://redis.io/) is an open source, advanced, in-memory key-value database.
66
It offers a set of simple, atomic operations in order to work with its primitive data types.
77
Its lightweight design and fast operation makes it an ideal candidate for modern application stacks.
88
This library provides you a simple API to work with your Redis database from within PHP.
@@ -15,11 +15,11 @@ It enables you to set and query its data or use its PubSub topics to react to in
1515
* **Event-driven core** -
1616
Register your event handler callbacks to react to incoming events, such as an incoming PubSub message event.
1717
* **Lightweight, SOLID design** -
18-
Provides a thin abstraction that is [*just good enough*](http://en.wikipedia.org/wiki/Principle_of_good_enough)
18+
Provides a thin abstraction that is [*just good enough*](https://en.wikipedia.org/wiki/Principle_of_good_enough)
1919
and does not get in your way.
2020
Future or custom commands and events require no changes to be supported.
2121
* **Good test coverage** -
22-
Comes with an automated tests suite and is regularly tested against versions as old as Redis v2.6+
22+
Comes with an automated tests suite and is regularly tested against versions as old as Redis v2.6 and newer.
2323

2424
**Table of Contents**
2525

@@ -130,7 +130,7 @@ reject its value with an Exception and will cancel the underlying TCP/IP
130130
connection attempt and/or Redis authentication.
131131

132132
```php
133-
$promise = $factory->createConnection($redisUri);
133+
$promise = $factory->createClient($redisUri);
134134

135135
$loop->addTimer(3.0, function () use ($promise) {
136136
$promise->cancel();
@@ -340,7 +340,7 @@ Besides defining a few methods, this interface also implements the
340340

341341
#### Commands
342342

343-
All [Redis commands](http://redis.io/commands) are automatically available as public methods like this:
343+
All [Redis commands](https://redis.io/commands) are automatically available as public methods like this:
344344

345345
```php
346346
$client->get($key);
@@ -361,8 +361,8 @@ $client->select($database);
361361
// many more…
362362
```
363363

364-
Listing all available commands is out of scope here, please refer to the [Redis command reference](http://redis.io/commands).
365-
All [Redis commands](http://redis.io/commands) are automatically available as public methods via the magic `__call()` method.
364+
Listing all available commands is out of scope here, please refer to the [Redis command reference](https://redis.io/commands).
365+
All [Redis commands](https://redis.io/commands) are automatically available as public methods via the magic `__call()` method.
366366

367367
Each of these commands supports async operation and either *resolves* with
368368
its *results* or *rejects* with an `Exception`.
@@ -534,10 +534,11 @@ See also the [`close()`](#close) method.
534534
The recommended way to install this library is [through Composer](https://getcomposer.org).
535535
[New to Composer?](https://getcomposer.org/doc/00-intro.md)
536536

537+
This project follows [SemVer](https://semver.org/).
537538
This will install the latest supported version:
538539

539540
```bash
540-
$ composer require clue/redis-react:^2.2
541+
$ composer require clue/redis-react:^2.3
541542
```
542543

543544
See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades.
@@ -574,4 +575,7 @@ $ REDIS_URI=localhost:6379 php vendor/bin/phpunit
574575

575576
## License
576577

577-
MIT
578+
This project is released under the permissive [MIT license](LICENSE).
579+
580+
> Did you know that I offer custom development services and issuing invoices for
581+
sponsorships of releases and for contributions? Contact me (@clue) for details.

0 commit comments

Comments
 (0)