@@ -62,6 +62,10 @@ Once [installed](#install), you can use the following code to connect to your
62
62
local Redis server and send some requests:
63
63
64
64
``` php
65
+ <?php
66
+
67
+ require __DIR__ . '/vendor/autoload.php';
68
+
65
69
$factory = new Clue\React\Redis\Factory();
66
70
$redis = $factory->createLazyClient('localhost:6379');
67
71
@@ -506,7 +510,7 @@ in seconds (or use a negative number to not apply a timeout) like this:
506
510
$factory->createLazyClient('localhost?timeout=0.5');
507
511
```
508
512
509
- By default, this method will keep "idle" connection open for 60s and will
513
+ By default, this method will keep "idle" connections open for 60s and will
510
514
then end the underlying connection. The next request after an "idle"
511
515
connection ended will automatically create a new underlying connection.
512
516
This ensure you always get a "fresh" connection and as such should not be
@@ -599,7 +603,7 @@ See also the [`close()`](#close) method.
599
603
600
604
## Install
601
605
602
- The recommended way to install this library is [ through Composer] ( https://getcomposer.org ) .
606
+ The recommended way to install this library is [ through Composer] ( https://getcomposer.org/ ) .
603
607
[ New to Composer?] ( https://getcomposer.org/doc/00-intro.md )
604
608
605
609
This project follows [ SemVer] ( https://semver.org/ ) .
@@ -619,7 +623,7 @@ It's *highly recommended to use PHP 7+* for this project.
619
623
## Tests
620
624
621
625
To run the test suite, you first need to clone this repo and then install all
622
- dependencies [ through Composer] ( https://getcomposer.org ) :
626
+ dependencies [ through Composer] ( https://getcomposer.org/ ) :
623
627
624
628
``` bash
625
629
$ composer install
@@ -628,7 +632,7 @@ $ composer install
628
632
To run the test suite, go to the project root and run:
629
633
630
634
``` bash
631
- $ php vendor/bin/phpunit
635
+ $ vendor/bin/phpunit
632
636
```
633
637
634
638
The test suite contains both unit tests and functional integration tests.
@@ -645,7 +649,7 @@ To now run the functional tests, you need to supply *your* login
645
649
details in an environment variable like this:
646
650
647
651
``` bash
648
- $ REDIS_URI=localhost:6379 php vendor/bin/phpunit
652
+ $ REDIS_URI=localhost:6379 vendor/bin/phpunit
649
653
```
650
654
651
655
## License
0 commit comments