From f5ab4040a547d65d6279da2d9ae00351e886a0c1 Mon Sep 17 00:00:00 2001
From: Milan Sulc
Date: Thu, 4 Jun 2026 20:30:50 +0000
Subject: [PATCH 1/2] Docs: move documentation to README
---
.docs/README.md | 124 ----------------------------------------------
README.md | 129 ++++++++++++++++++++++++++++++++++++++++++++----
2 files changed, 120 insertions(+), 133 deletions(-)
delete mode 100644 .docs/README.md
diff --git a/.docs/README.md b/.docs/README.md
deleted file mode 100644
index 7802dae..0000000
--- a/.docs/README.md
+++ /dev/null
@@ -1,124 +0,0 @@
-# Contributte Redis
-
-[Predis](https://github.com/nrk/predis) integration into [Nette/DI](https://github.com/nette/di)
-
-## Content
-
-- [Setup](#setup)
-- [Configuration](#setup)
-
-## Setup
-
-```bash
-composer require contributte/redis
-```
-
-```neon
-extensions:
- redis: Contributte\Redis\DI\RedisExtension # For Nette 3+
- redis: Contributte\Redis\DI\RedisExtension24 # For Nette 2.4
-```
-
-## Configuration
-
-```neon
-redis:
- # Setup Tracy panel
- debug: %debugMode%
-
- # Default client factory
- clientFactory: Predis\Client
-
- connection:
- default:
- uri: tcp://127.0.0.1:6379
-
- # Options passed directly to Predis\Client
- # https://github.com/nrk/predis#client-configuration
- options: []
-```
-
-### Sessions
-
-Setup Nette\Http\Session to store session with Redis
-
-```neon
-redis:
- connection:
- default:
- sessions: true
-
- ## you can also configure session
- sessions:
- ttl: 3600 # time in seconds after which is session invalidated
-```
-
-### Cache
-
-Replaces Nette\Caching\IStorage in DIC with RedisStorage
-
-```neon
-redis:
- connection:
- default:
- storage: true
-```
-
-### Custom serializer
-
-To use custom serializer for storage you need to implement `Contributte/Redis/Serializer/Serializer` interface.
-
-After that, register serializer as a service and place it under `redis.serializer` key.
-
-```neon
-redis:
- serializer: @customSerializer
- connection:
- default:
- storage: true
-
-services:
- customSerializer: App\Serializers\YourSerializer
-```
-
-This package provides several serializers:
-
-- DefaultSerializer
-- IgbinarySerializer
-- SnappySerializer
-
-### ENV variables
-
-In the need of passing down ENV variables to the configuration you can use `nette/configurator` and [**dynamic parameters**](https://doc.nette.org/en/3.1/bootstrap#toc-dynamic-parameters).
-
-```php
-$configurator->addDynamicParameters([
- 'env' => getenv(),
-]);
-```
-
-```neon
-redis:
- connection:
- default:
- uri: %env.REDIS_HOST%
-```
-
-### Sessions and cache
-
-When using sessions and cache make sure you use **2 different databases**. One for cache and one for sessions. In case you will use only 1 database for both **you will loose sessions when clearing cache.**
-This would be preferred config:
-
-```neon
-connection:
- default:
- uri: tcp://127.0.0.1:6379
- sessions: false
- storage: true
- options: ['parameters': ['database': 0]]
- session:
- uri: tcp://127.0.0.1:6379
- sessions: true
- storage: false
- options: ['parameters': ['database': 1]]
-```
diff --git a/README.md b/README.md
index a5ef04f..d607a51 100644
--- a/README.md
+++ b/README.md
@@ -18,24 +18,135 @@
Website 🚀 contributte.org | Contact 👨🏻💻 f3l1x.io | Twitter 🐦 @contributte
-## Usage
+Redis client integration into Nette framework.
-To install the latest version of `contributte/redis` use [Composer](https://getcomposer.org).
+## Versions
+
+| State | Version | Branch | Nette | PHP |
+|-------------|---------|----------|-------|---------|
+| dev | `^0.7` | `master` | 3.0+ | `>=8.2` |
+| stable | `^0.6` | `master` | 3.0+ | `>=7.2` |
+
+## Contents
+
+- [Installation](#installation)
+- [Configuration](#configuration)
+
+## Installation
```bash
composer require contributte/redis
```
-## Documentation
+```neon
+extensions:
+ redis: Contributte\Redis\DI\RedisExtension # For Nette 3+
+ redis: Contributte\Redis\DI\RedisExtension24 # For Nette 2.4
+```
-For details on how to use this package, check out our [documentation](.docs).
+## Configuration
-## Versions
+```neon
+redis:
+ # Setup Tracy panel
+ debug: %debugMode%
-| State | Version | Branch | Nette | PHP |
-|-------------|---------|----------|-------|---------|
-| dev | `^0.7` | `master` | 3.0+ | `>=8.2` |
-| stable | `^0.6` | `master` | 3.0+ | `>=7.2` |
+ # Default client factory
+ clientFactory: Predis\Client
+
+ connection:
+ default:
+ uri: tcp://127.0.0.1:6379
+
+ # Options passed directly to Predis\Client
+ # https://github.com/nrk/predis#client-configuration
+ options: []
+```
+
+### Sessions
+
+Setup Nette\Http\Session to store session with Redis
+
+```neon
+redis:
+ connection:
+ default:
+ sessions: true
+
+ ## you can also configure session
+ sessions:
+ ttl: 3600 # time in seconds after which is session invalidated
+```
+
+### Cache
+
+Replaces Nette\Caching\IStorage in DIC with RedisStorage
+
+```neon
+redis:
+ connection:
+ default:
+ storage: true
+```
+
+### Custom serializer
+
+To use custom serializer for storage you need to implement `Contributte/Redis/Serializer/Serializer` interface.
+
+After that, register serializer as a service and place it under `redis.serializer` key.
+
+```neon
+redis:
+ serializer: @customSerializer
+ connection:
+ default:
+ storage: true
+
+services:
+ customSerializer: App\Serializers\YourSerializer
+```
+
+This package provides several serializers:
+
+- DefaultSerializer
+- IgbinarySerializer
+- SnappySerializer
+
+### ENV variables
+
+In the need of passing down ENV variables to the configuration you can use `nette/configurator` and [**dynamic parameters**](https://doc.nette.org/en/3.1/bootstrap#toc-dynamic-parameters).
+
+```php
+$configurator->addDynamicParameters([
+ 'env' => getenv(),
+]);
+```
+
+```neon
+redis:
+ connection:
+ default:
+ uri: %env.REDIS_HOST%
+```
+
+### Sessions and cache
+
+When using sessions and cache make sure you use **2 different databases**. One for cache and one for sessions. In case you will use only 1 database for both **you will loose sessions when clearing cache.**
+This would be preferred config:
+
+```neon
+connection:
+ default:
+ uri: tcp://127.0.0.1:6379
+ sessions: false
+ storage: true
+ options: ['parameters': ['database': 0]]
+ session:
+ uri: tcp://127.0.0.1:6379
+ sessions: true
+ storage: false
+ options: ['parameters': ['database': 1]]
+```
## Development
From f28e62d8101dae4a8318fa1282d907f59c438570 Mon Sep 17 00:00:00 2001
From: Oh My Felix
Date: Tue, 7 Jul 2026 17:04:15 +0000
Subject: [PATCH 2/2] Docs: polish README migration
---
README.md | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index d607a51..b0de1e4 100644
--- a/README.md
+++ b/README.md
@@ -31,6 +31,11 @@ Redis client integration into Nette framework.
- [Installation](#installation)
- [Configuration](#configuration)
+ - [Sessions](#sessions)
+ - [Cache](#cache)
+ - [Custom serializer](#custom-serializer)
+ - [ENV variables](#env-variables)
+ - [Sessions and cache](#sessions-and-cache)
## Installation
@@ -40,8 +45,7 @@ composer require contributte/redis
```neon
extensions:
- redis: Contributte\Redis\DI\RedisExtension # For Nette 3+
- redis: Contributte\Redis\DI\RedisExtension24 # For Nette 2.4
+ redis: Contributte\Redis\DI\RedisExtension
```
## Configuration
@@ -152,7 +156,7 @@ connection:
See [how to contribute](https://contributte.org/contributing.html) to this package.
-This package is currently maintaining by these authors.
+This package is currently maintained by these authors.