Skip to content

Commit 9c85406

Browse files
authored
Docs folder standardization and other fixes (#66)
1 parent f980f12 commit 9c85406

File tree

5 files changed

+44
-34
lines changed

5 files changed

+44
-34
lines changed

LICENSE.md

Lines changed: 4 additions & 4 deletions
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

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,27 @@ a distributed applications (e.g. with several servers, load balancers, etc.).
3030

3131
The package could be installed with composer:
3232

33-
```
33+
```shell
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+
3754
## Configuration
3855

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

129146
- [Internals](docs/internals.md)
130147

131-
## License
148+
## Support
132149

133-
The Yii Cache Library - Memcached Handler is free software. It is released under the terms of the BSD License.
134-
Please see [`LICENSE`](./LICENSE.md) for more information.
135-
136-
Maintained by [Yii Software](https://www.yiiframework.com/).
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).
137152

138153
## Support the project
139154

@@ -146,3 +161,10 @@ Maintained by [Yii Software](https://www.yiiframework.com/).
146161
[![Telegram](https://img.shields.io/badge/telegram-join-1DA1F2?style=flat&logo=telegram)](https://t.me/yii3en)
147162
[![Facebook](https://img.shields.io/badge/facebook-join-1DA1F2?style=flat&logo=facebook&logoColor=ffffff)](https://www.facebook.com/groups/yiitalk)
148163
[![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/).

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"issues": "https://github.com/yiisoft/cache-memcached/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-memcached"
2121
},

docs/internals.md

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,5 @@
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-
```
17-
--network container:yiisoft-cache-memcached-cache
18-
```
19-
203
## Unit testing
214

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

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

4730
Use [Rector](https://github.com/rectorphp/rector) to make codebase follow some specific rules or
4831
use either newest or any specific version of PHP:
@@ -51,7 +34,12 @@ use either newest or any specific version of PHP:
5134
./vendor/bin/rector
5235
```
5336

54-
## Dependencies
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`.
5540

56-
Use [ComposerRequireChecker](https://github.com/maglnet/ComposerRequireChecker) to detect transitive
57-
[Composer](https://getcomposer.org/) dependencies.
41+
To run the checker, execute the following command:
42+
43+
```shell
44+
./vendor/bin/composer-require-checker
45+
```

src/Memcached.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
/**
2222
* Memcached implements a cache application component based on
23-
* [memcached](http://pecl.php.net/package/memcached) PECL extension.
23+
* [memcached](https://pecl.php.net/package/memcached) PECL extension.
2424
*
2525
* Memcached can be configured with a list of memcached servers passed to the constructor.
2626
* By default, Memcached assumes there is a memcached server running on localhost at port 11211.
@@ -251,7 +251,7 @@ private function normalizeServers(array $servers): array
251251
) {
252252
throw new InvalidArgumentException(
253253
'Each entry in servers parameter is supposed to be an array'
254-
. ' containing hostname (string), port (int), and, optionally, weight (int) of the server.',
254+
. ' containing hostname (string), port (int), and, optionally, weight (int) of the server.',
255255
);
256256
}
257257
/**

0 commit comments

Comments
 (0)