Skip to content

Commit

Permalink
add info
Browse files Browse the repository at this point in the history
  • Loading branch information
vjik committed Feb 17, 2024
1 parent 1467448 commit 8d8adf5
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 25 deletions.
28 changes: 3 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ a distributed applications (e.g. with several servers, load balancers, etc.).
The package could be installed with composer:

```
composer require yiisoft/cache-memcached --prefer-dist
composer require yiisoft/cache-memcached
```

## Configuration
Expand Down Expand Up @@ -124,31 +124,9 @@ To work with values in a more efficient manner, batch operations should be used:

This package can be used as a cache handler for the [Yii Caching Library](https://github.com/yiisoft/cache).

## Testing
## Documentation

### Unit testing

The package is tested with [PHPUnit](https://phpunit.de/). To run tests:

```shell
./vendor/bin/phpunit
```

### Mutation testing

The package tests are checked with [Infection](https://infection.github.io/) mutation framework. To run it:

```shell
./vendor/bin/infection
```

### Static analysis

The code is statically analyzed with [Psalm](https://psalm.dev/). To run static analysis:

```shell
./vendor/bin/psalm
```
- [Internals](docs/internals.md)

### Support the project

Expand Down
57 changes: 57 additions & 0 deletions docs/internals.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Internals

## Development environment

For greater ease it is recommended to use docker containers.

Run container with memcached directly via command:

```shell
docker run --rm --name yiisoft-cache-memcached-cache --detach --publish 11211:11211 memcached:1.6.23
```

Memcached must be accessible by address `127.0.0.1`. If you use PHP via docker container, run PHP container in network
of memcached container. Use `docker run` command argument for it:

```
--network container:yiisoft-cache-memcached-cache
```

## Unit testing

The package is tested with [PHPUnit](https://phpunit.de/). To run tests:

```shell
./vendor/bin/phpunit
```

## Mutation testing

The package tests are checked with [Infection](https://infection.github.io/) mutation framework with
[Infection Static Analysis Plugin](https://github.com/Roave/infection-static-analysis-plugin). To run it:

```shell
./vendor/bin/roave-infection-static-analysis-plugin
```

## Static analysis

The code is statically analyzed with [Psalm](https://psalm.dev/). To run static analysis:

```shell
./vendor/bin/psalm
```

## Code style

Use [Rector](https://github.com/rectorphp/rector) to make codebase follow some specific rules or
use either newest or any specific version of PHP:

```shell
./vendor/bin/rector
```

## Dependencies

Use [ComposerRequireChecker](https://github.com/maglnet/ComposerRequireChecker) to detect transitive
[Composer](https://getcomposer.org/) dependencies.

0 comments on commit 8d8adf5

Please sign in to comment.