Skip to content

Commit 449d2b0

Browse files
authored
Fix docs (#67)
1 parent 9c85406 commit 449d2b0

File tree

4 files changed

+36
-40
lines changed

4 files changed

+36
-40
lines changed

LICENSE.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ modification, are permitted provided that the following conditions
66
are met:
77

88
* Redistributions of source code must retain the above copyright
9-
notice, this list of conditions and the following disclaimer.
9+
notice, this list of conditions and the following disclaimer.
1010
* Redistributions in binary form must reproduce the above copyright
11-
notice, this list of conditions and the following disclaimer in
12-
the documentation and/or other materials provided with the
13-
distribution.
11+
notice, this list of conditions and the following disclaimer in
12+
the documentation and/or other materials provided with the
13+
distribution.
1414
* Neither the name of Yii Software nor the names of its
15-
contributors may be used to endorse or promote products derived
16-
from this software without specific prior written permission.
15+
contributors may be used to endorse or promote products derived
16+
from this software without specific prior written permission.
1717

1818
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1919
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT

README.md

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -34,23 +34,6 @@ The package could be installed with composer:
3434
composer require yiisoft/cache-memcached
3535
```
3636

37-
## Development environment
38-
39-
For greater ease it is recommended to use docker containers.
40-
41-
Run container with memcached directly via command:
42-
43-
```dockerfile
44-
docker run --rm --name yiisoft-cache-memcached-cache --detach --publish 11211:11211 memcached:1.6.23
45-
```
46-
47-
Memcached must be accessible by address `127.0.0.1`. If you use PHP via docker container, run PHP container in network
48-
of memcached container. Use `docker run` command argument for it:
49-
50-
```shell
51-
--network container:yiisoft-cache-memcached-cache
52-
```
53-
5437
## Configuration
5538

5639
Creating an instance:
@@ -145,10 +128,15 @@ This package can be used as a cache handler for the [Yii Caching Library](https:
145128

146129
- [Internals](docs/internals.md)
147130

148-
## Support
131+
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
132+
that. You may also check out other [Yii Community Resources](https://www.yiiframework.com/community).
133+
134+
## License
135+
136+
The Yii Cache Library - Memcached Handler is free software. It is released under the terms of the BSD License.
137+
Please see [`LICENSE`](./LICENSE.md) for more information.
149138

150-
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.
151-
You may also check out other [Yii Community Resources](https://www.yiiframework.com/community).
139+
Maintained by [Yii Software](https://www.yiiframework.com/).
152140

153141
## Support the project
154142

@@ -161,10 +149,3 @@ You may also check out other [Yii Community Resources](https://www.yiiframework.
161149
[![Telegram](https://img.shields.io/badge/telegram-join-1DA1F2?style=flat&logo=telegram)](https://t.me/yii3en)
162150
[![Facebook](https://img.shields.io/badge/facebook-join-1DA1F2?style=flat&logo=facebook&logoColor=ffffff)](https://www.facebook.com/groups/yiitalk)
163151
[![Slack](https://img.shields.io/badge/slack-join-1DA1F2?style=flat&logo=slack)](https://yiiframework.com/go/slack)
164-
165-
## License
166-
167-
The Yii Cache Library - Memcached Handler is free software. It is released under the terms of the BSD License.
168-
Please see [`LICENSE`](./LICENSE.md) for more information.
169-
170-
Maintained by [Yii Software](https://www.yiiframework.com/).

docs/internals.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,22 @@
11
# Internals
22

3+
## Development environment
4+
5+
For greater ease it is recommended to use docker containers.
6+
7+
Run container with memcached directly via command:
8+
9+
```shell
10+
docker run --rm --name yiisoft-cache-memcached-cache --detach --publish 11211:11211 memcached:1.6.23
11+
```
12+
13+
Memcached must be accessible by address `127.0.0.1`. If you use PHP via docker container, run PHP container in network
14+
of memcached container. Use `docker run` command argument for it:
15+
16+
```shell
17+
--network container:yiisoft-cache-memcached-cache
18+
```
19+
320
## Unit testing
421

522
The package is tested with [PHPUnit](https://phpunit.de/). To run tests:
@@ -25,7 +42,7 @@ The code is statically analyzed with [Psalm](https://psalm.dev/). To run static
2542
./vendor/bin/psalm
2643
```
2744

28-
## Rector
45+
## Code style
2946

3047
Use [Rector](https://github.com/rectorphp/rector) to make codebase follow some specific rules or
3148
use either newest or any specific version of PHP:
@@ -34,11 +51,10 @@ use either newest or any specific version of PHP:
3451
./vendor/bin/rector
3552
```
3653

37-
## Composer require checker
38-
39-
This package uses [composer-require-checker](https://github.com/maglnet/ComposerRequireChecker) to check if all dependencies are correctly defined in `composer.json`.
54+
## Dependencies
4055

41-
To run the checker, execute the following command:
56+
This package uses [composer-require-checker](https://github.com/maglnet/ComposerRequireChecker) to check if all
57+
dependencies are correctly defined in `composer.json`. To run the checker, execute the following command:
4258

4359
```shell
4460
./vendor/bin/composer-require-checker

src/Memcached.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,7 @@ private function normalizeServers(array $servers): array
250250
|| (isset($server['weight']) && !is_int($server['weight']))
251251
) {
252252
throw new InvalidArgumentException(
253-
'Each entry in servers parameter is supposed to be an array'
254-
. ' containing hostname (string), port (int), and, optionally, weight (int) of the server.',
253+
'Each entry in servers parameter is supposed to be an array containing hostname (string), port (int), and, optionally, weight (int) of the server.',
255254
);
256255
}
257256
/**

0 commit comments

Comments
 (0)