Skip to content

Commit 18cc679

Browse files
authored
Merge pull request #20 from clue-labs/examples
Update examples and add .gitattributes to exclude dev files from exports
2 parents 9c78a04 + 5b72035 commit 18cc679

File tree

4 files changed

+15
-9
lines changed

4 files changed

+15
-9
lines changed

.gitattributes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/.gitattributes export-ignore
2+
/.github/workflows/ export-ignore
3+
/.gitignore export-ignore
4+
/examples/ export-ignore
5+
/phpunit.xml.dist export-ignore
6+
/phpunit.xml.legacy export-ignore
7+
/tests/ export-ignore

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,11 @@ Let's take these projects to the next level together! 🚀
4343
## Quickstart example
4444

4545
```php
46-
use Clue\Redis\Protocol;
46+
<?php
4747

48-
$factory = new Protocol\Factory();
48+
require __DIR__ . '/vendor/autoload.php';
49+
50+
$factory = new Clue\Redis\Protocol\Factory();
4951
$parser = $factory->createResponseParser();
5052
$serializer = $factory->createSerializer();
5153

@@ -63,6 +65,8 @@ var_dump($reply1->getValueNative()); // string(2) "OK"
6365
var_dump($reply2->getValueNative()); // string(5) "value"
6466
```
6567

68+
See also the [examples](examples/).
69+
6670
## Usage
6771

6872
### Factory

example/client.php renamed to examples/client.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
require __DIR__ . '/../vendor/autoload.php';
44

5-
use Clue\Redis\Protocol;
6-
7-
$factory = new Protocol\Factory();
5+
$factory = new Clue\Redis\Protocol\Factory();
86
$parser = $factory->createResponseParser();
97
$serializer = $factory->createSerializer();
108

example/perf.php renamed to examples/perf.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
<?php
22

3-
use Clue\Redis\Protocol\ProtocolBuffer;
4-
use Clue\Redis\Protocol\Factory;
5-
63
require __DIR__ . '/../vendor/autoload.php';
74

8-
$factory = new Factory();
5+
$factory = new Clue\Redis\Protocol\Factory();
96
$parser = $factory->createResponseParser();
107
$serializer = $factory->createSerializer();
118

0 commit comments

Comments
 (0)