Skip to content

Commit 9851595

Browse files
authored
Docs folder standardization and other fixes (#33)
1 parent 85767c4 commit 9851595

File tree

4 files changed

+88
-60
lines changed

4 files changed

+88
-60
lines changed

LICENSE.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
Copyright © 2008 by Yii Software (https://www.yiiframework.com/)
1+
Copyright © 2008 by Yii Software (<https://www.yiiframework.com/>)
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without
55
modification, are permitted provided that the following conditions
66
are met:
77

8-
* Redistributions of source code must retain the above copyright
8+
* Redistributions of source code must retain the above copyright
99
notice, this list of conditions and the following disclaimer.
10-
* Redistributions in binary form must reproduce the above copyright
10+
* Redistributions in binary form must reproduce the above copyright
1111
notice, this list of conditions and the following disclaimer in
1212
the documentation and/or other materials provided with the
1313
distribution.
14-
* Neither the name of Yii Software nor the names of its
14+
* Neither the name of Yii Software nor the names of its
1515
contributors may be used to endorse or promote products derived
1616
from this software without specific prior written permission.
1717

README.md

+13-55
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ $client = new \Predis\Client([
103103
);
104104
$cache = new \Yiisoft\Cache\Redis\RedisCache($client);
105105
```
106+
106107
Predis will route commands on its own when specifying Redis nodes in the cluster to the appropriate nodes depending on the keys that are specified in the commands.
107108

108109
You can implement `\Predis\Distribution\DistributorInterface` to create their own distributors used by the client to distribute keys among a cluster of servers.
@@ -132,64 +133,14 @@ $client = new \Predis\Client([
132133
);
133134
```
134135

135-
## Testing
136-
137-
> The tests use a connection to a running Redis cluster. If you are not using Docker, you must start the cluster yourself before running the tests.
138-
139-
### Unit testing
140-
141-
The package is tested with [PHPUnit](https://phpunit.de/). To run tests:
142-
143-
```shell
144-
./vendor/bin/phpunit
145-
```
146-
147-
### Mutation testing
148-
149-
The package tests are checked with [Infection](https://infection.github.io/) mutation framework with
150-
[Infection Static Analysis Plugin](https://github.com/Roave/infection-static-analysis-plugin). To run it:
151-
152-
```shell
153-
./vendor/bin/roave-infection-static-analysis-plugin
154-
```
155-
156-
### Static analysis
157-
158-
The code is statically analyzed with [Psalm](https://psalm.dev/). To run static analysis:
159-
160-
```shell
161-
./vendor/bin/psalm
162-
```
163-
164-
## Testing in Docker
165-
166-
### Prepare
167-
168-
```bash
169-
# {{ v }} = 8.0, 8.1, 8.2. Default PHP 8.1
170-
make build v=8.1
171-
```
172-
173-
### Unit testing
174-
175-
```bash
176-
# {{ v }} = 8.0, 8.1, 8.2. Default PHP 8.1
177-
make test v=8.1
178-
```
179-
180-
### Mutation testing
136+
## Documentation
181137

182-
```bash
183-
# {{ v }} = 8.0, 8.1, 8.2. Default PHP 8.1
184-
make mutation-test v=8.0
185-
```
138+
- [Internals](docs/internals.md)
186139

187-
## License
140+
## Support
188141

189-
The Yii Caching Library - Redis Handler is free software. It is released under the terms of the BSD License.
190-
Please see [`LICENSE`](./LICENSE.md) for more information.
191-
192-
Maintained by [Yii Software](https://www.yiiframework.com/).
142+
If you need help or have a question, the [Yii Forum](https://forum.yiiframework.com/c/yii-3-0/63) is a good place for that.
143+
You may also check out other [Yii Community Resources](https://www.yiiframework.com/community).
193144

194145
## Support the project
195146

@@ -202,3 +153,10 @@ Maintained by [Yii Software](https://www.yiiframework.com/).
202153
[![Telegram](https://img.shields.io/badge/telegram-join-1DA1F2?style=flat&logo=telegram)](https://t.me/yii3en)
203154
[![Facebook](https://img.shields.io/badge/facebook-join-1DA1F2?style=flat&logo=facebook&logoColor=ffffff)](https://www.facebook.com/groups/yiitalk)
204155
[![Slack](https://img.shields.io/badge/slack-join-1DA1F2?style=flat&logo=slack)](https://yiiframework.com/go/slack)
156+
157+
## License
158+
159+
The Yii Caching Library - Redis Handler is free software. It is released under the terms of the BSD License.
160+
Please see [`LICENSE`](./LICENSE.md) for more information.
161+
162+
Maintained by [Yii Software](https://www.yiiframework.com/).

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"issues": "https://github.com/yiisoft/cache-redis/issues?state=open",
1616
"forum": "https://www.yiiframework.com/forum/",
1717
"wiki": "https://www.yiiframework.com/wiki/",
18-
"irc": "irc://irc.freenode.net/yii",
18+
"irc": "ircs://irc.libera.chat:6697/yii",
1919
"chat": "https://t.me/yii3en",
2020
"source": "https://github.com/yiisoft/cache-redis"
2121
},

docs/internals.md

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Internals
2+
3+
> The tests use a connection to a running Redis cluster. If you are not using Docker, you must start the cluster yourself before running the tests.
4+
5+
## Testing in Docker
6+
7+
### Prepare
8+
9+
```shell
10+
# {{ v }} = 8.0, 8.1, 8.2. Default PHP 8.1
11+
make build v=8.1
12+
```
13+
14+
### Unit testing
15+
16+
```shell
17+
# {{ v }} = 8.0, 8.1, 8.2. Default PHP 8.1
18+
make test v=8.1
19+
```
20+
21+
### Mutation testing
22+
23+
```shell
24+
# {{ v }} = 8.0, 8.1, 8.2. Default PHP 8.1
25+
make mutation-test v=8.0
26+
```
27+
28+
## Unit testing
29+
30+
The package is tested with [PHPUnit](https://phpunit.de/). To run tests:
31+
32+
```shell
33+
./vendor/bin/phpunit
34+
```
35+
36+
## Mutation testing
37+
38+
The package tests are checked with [Infection](https://infection.github.io/) mutation framework with
39+
[Infection Static Analysis Plugin](https://github.com/Roave/infection-static-analysis-plugin). To run it:
40+
41+
```shell
42+
./vendor/bin/roave-infection-static-analysis-plugin
43+
```
44+
45+
## Static analysis
46+
47+
The code is statically analyzed with [Psalm](https://psalm.dev/). To run static analysis:
48+
49+
```shell
50+
./vendor/bin/psalm
51+
```
52+
53+
## Rector
54+
55+
Use [Rector](https://github.com/rectorphp/rector) to make codebase follow some specific rules or
56+
use either newest or any specific version of PHP:
57+
58+
```shell
59+
./vendor/bin/rector
60+
```
61+
62+
## Composer require checker
63+
64+
This package uses [composer-require-checker](https://github.com/maglnet/ComposerRequireChecker) to check if all dependencies are correctly defined in `composer.json`.
65+
66+
To run the checker, execute the following command:
67+
68+
```shell
69+
./vendor/bin/composer-require-checker
70+
```

0 commit comments

Comments
 (0)