44
55# 📦 maatify/common
66
7- [ ![ Version] ( https://img.shields.io/packagist/v/maatify/common?label=Version&color=4C1 )] ( https://packagist.org/packages/maatify/common )
8- [ ![ PHP] ( https://img.shields.io/packagist/php-v/maatify/common?label=PHP&color=777BB3 )] ( https://packagist.org/packages/maatify/common )
9- [ ![ Build] ( https://github.com/Maatify/common/actions/workflows/ci.yml/badge.svg?label=Build&color=brightgreen )] ( https://github.com/Maatify/common/actions/workflows/ci.yml )
10- [ ![ Monthly Downloads] ( https://img.shields.io/packagist/dm/maatify/common?label=Monthly%20Downloads&color=00A8E8 )] ( https://packagist.org/packages/maatify/common )
11- [ ![ Total Downloads] ( https://img.shields.io/packagist/dt/maatify/common?label=Total%20Downloads&color=2AA )] ( https://packagist.org/packages/maatify/common )
12- [ ![ Stars] ( https://img.shields.io/github/stars/Maatify/common?label=Stars&color=FFD43B )] ( https://github.com/Maatify/common/stargazers )
13- [ ![ License] ( https://img.shields.io/github/license/Maatify/common?label=License&color=blueviolet )] ( LICENSE )
14- [ ![ Status] ( https://img.shields.io/badge/Status-Stable-success?style=flat-square )] ( )
15- [ ![ Code Quality] ( https://img.shields.io/codefactor/grade/github/Maatify/common/main )] ( https://www.codefactor.io/repository/github/Maatify/common )
7+ <!-- 1) Package Info -->
8+ [ ![ Version] ( https://img.shields.io/packagist/v/maatify/common?label=Version&color=4C1&style=flat-square )] ( https://packagist.org/packages/maatify/common )
9+ [ ![ PHP] ( https://img.shields.io/packagist/php-v/maatify/common?label=PHP&color=777BB3&style=flat-square )] ( https://packagist.org/packages/maatify/common )
10+ [ ![ License] ( https://img.shields.io/github/license/Maatify/common?label=License&color=blueviolet&style=flat-square )] ( LICENSE )
11+ [ ![ Status] ( https://img.shields.io/badge/Status-Stable-success?style=flat-square )] ( CHANGELOG.md )
12+
13+ <!-- 2) CI / QA -->
14+ [ ![ Build] ( https://github.com/Maatify/common/actions/workflows/ci.yml/badge.svg?style=flat-square )] ( https://github.com/Maatify/common/actions/workflows/ci.yml )
15+ [ ![ PHPStan] ( https://img.shields.io/badge/PHPStan-Level%206-4E8CAE?style=flat-square )] ( https://phpstan.org/ )
16+ [ ![ Code Quality] ( https://img.shields.io/codefactor/grade/github/Maatify/common/main?color=brightgreen&style=flat-square )] ( https://www.codefactor.io/repository/github/Maatify/common )
17+
18+ [ // ] : # ( [ ; ]( ;) ; )
19+
20+ <!-- 3) Popularity -->
21+ [ ![ Monthly Downloads] ( https://img.shields.io/packagist/dm/maatify/common?label=Monthly%20Downloads&color=00A8E8&style=flat-square )] ( https://packagist.org/packages/maatify/common )
22+ [ ![ Total Downloads] ( https://img.shields.io/packagist/dt/maatify/common?label=Total%20Downloads&color=2AA9E0&style=flat-square )] ( https://packagist.org/packages/maatify/common )
23+ [ ![ Stars] ( https://img.shields.io/github/stars/Maatify/common?label=Stars&color=FFD43B&cacheSeconds=3600&style=flat-square )] ( https://github.com/Maatify/common/stargazers )
24+
25+ <!-- 4) Documentation -->
26+ [ ![ Changelog] ( https://img.shields.io/badge/Changelog-View-blue?style=flat-square )] ( CHANGELOG.md )
27+ [ ![ Security] ( https://img.shields.io/badge/Security-Policy-important?style=flat-square )] ( SECURITY.md )
28+ [ ![ Full Docs] ( https://img.shields.io/badge/Docs-Full%20Guide-0A66C2?style=flat-square )] ( docs/README.full.md )
29+ [ ![ Contributing] ( https://img.shields.io/badge/Contributing-Guide-0A9396?style=flat-square )] ( CONTRIBUTING.md )
1630
1731---
1832
19- ## 🏁 Stable Release v1.0.8 — Repository Layer Foundation
33+ ## 🏁 Stable Release v1.0.9 — Redis Client Contract Added
2034
2135The core foundational library of the Maatify.dev ecosystem providing standardized DTOs, validation, sanitization,
2236date/time, locking, text utilities, and now ** a unified RepositoryInterface** powering all Maatify data layers.
@@ -30,8 +44,8 @@ date/time, locking, text utilities, and now **a unified RepositoryInterface** po
3044
3145| Key | Value |
3246| -----------------| ---------------------|
33- | Version | ** 1.0.8 Stable** |
34- | Release Date | 2025-11-22 |
47+ | Version | ** 1.0.9 Stable** |
48+ | Release Date | 2025-11-26 |
3549| PHP Requirement | ≥ 8.4 |
3650| License | MIT |
3751| Coverage | 98 % |
@@ -50,9 +64,46 @@ shared across all **Maatify** ecosystem packages such as:
5064* ` maatify/psr-logger `
5165* ` maatify/bootstrap `
5266
67+ > ** New in v1.0.9:**
68+ > A unified ** RedisClientInterface** providing a minimal KV API compatible with phpredis, Predis, and FakeRedisConnection.
69+
5370> ** New in v1.0.8:**
5471> A unified ** RepositoryInterface** that standardizes CRUD operations across MySQL, Mongo, Redis, Predis, and DBAL repositories.
5572
73+ ---
74+ ## 🚀 What’s New in v1.0.9 (Phase 17)
75+
76+ ### ⭐ Redis Client Contract Added
77+
78+ Phase 17 introduces the ** RedisClientInterface** , a minimal and unified Redis API surface shared across
79+ ` phpredis ` , ` Predis ` , and the in-memory ` FakeRedisConnection ` .
80+
81+ ### ✔ Added
82+
83+ * ** ` RedisClientInterface ` **
84+
85+ * ` get() `
86+ * ` set() `
87+ * ` del() `
88+ * ` keys() `
89+
90+ ### ✔ Updated
91+
92+ * README.full.md
93+ * API Map
94+ * roadmap.json
95+ * CHANGELOG → ** v1.0.9**
96+ * VERSION → ** 1.0.9**
97+ * Added ` /docs/phases/README.phase17.md `
98+
99+ ### ✔ Compatibility
100+
101+ * Fully driver-agnostic (phpredis / predis / fakes)
102+ * Required for next updates in:
103+ * maatify/data-fakes (FakeRedis → full KV compatibility)
104+ * maatify/data-adapters (RedisAdapter)
105+ * maatify/data-repository (cache decorators)
106+
56107---
57108
58109## 🚀 What’s New in v1.0.8 (Phase 16)
@@ -93,12 +144,12 @@ Phase 16 introduces a standardized repository contract used across the entire Ma
93144
94145| File | Description |
95146| ----------------------------------| ----------------------------------------|
96- | ` /docs/README.full.md ` | Full documentation (Phases 1–16 ) |
147+ | ` /docs/README.full.md ` | Full documentation (Phases 1–17 ) |
97148| ` /docs/enums.md ` | Enums & constants reference |
98149| ` /docs/phases/README.phase16.md ` | Phase 16 — Repository Layer Foundation |
99- | ` CHANGELOG.md ` | Version history (updated to 1.0.8 ) |
150+ | ` CHANGELOG.md ` | Version history (updated to 1.0.9 ) |
100151| ` CONTRIBUTING.md ` | Contribution guidelines |
101- | ` VERSION ` | Current version → ** 1.0.8 ** |
152+ | ` VERSION ` | Current version → ** 1.0.9 ** |
102153
103154---
104155
@@ -128,6 +179,11 @@ Phase 16 introduces a standardized repository contract used across the entire Ma
128179* ⚙️ ** Enums & Constants Standardization** — ` TextDirectionEnum ` , ` MessageTypeEnum ` , ` ErrorCodeEnum ` , ` PlatformEnum ` , ` AppEnvironmentEnum ` , ` CommonPaths ` , ` CommonLimits ` , ` CommonHeaders ` , ` Defaults ` , ` EnumHelper `
129180 Centralized enum and constant definitions ensuring consistent standards, reusable helpers, and unified configuration across all Maatify libraries.
130181
182+ * 🔌 ** Redis Client Contract** — ` RedisClientInterface `
183+ Minimal key–value Redis abstraction compatible with:
184+ * phpredis
185+ * Predis
186+ * FakeRedisConnection
131187---
132188
133189## ⚙️ Installation
@@ -755,6 +811,40 @@ echo Defaults::DEFAULT_TIMEZONE; // 'Africa/Cairo'
755811
756812---
757813
814+ ## 🔌 Redis Client Interface (Phase 17)
815+
816+ A unified minimal KV API that works across:
817+
818+ * phpredis
819+ * Predis
820+ * FakeRedisConnection (tests)
821+
822+ ### 🔹 Example — Get & Set
823+
824+ ``` php
825+ use Maatify\Common\Contracts\Redis\RedisClientInterface;
826+
827+ /** @var RedisClientInterface $redis */
828+ $redis->set('token', 'abc123');
829+
830+ echo $redis->get('token'); // abc123
831+ ````
832+
833+ ### 🔹 Example — Delete Many
834+
835+ ```php
836+ $deleted = $redis->del('a', 'b', 'c');
837+ // returns number of deleted keys
838+ ```
839+
840+ ### 🔹 Example — Pattern Keys
841+
842+ ``` php
843+ print_r($redis->keys('user:*'));
844+ ```
845+
846+ ---
847+
758848### 🗂 Directory (Enums & Constants)
759849
760850```
@@ -959,6 +1049,43 @@ src/
9591049
9601050---
9611051
1052+ # 🧾 ** Release Verification — v1.0.9 (Phase 17)**
1053+
1054+ ### ** Redis Client Contract**
1055+
1056+ ## ⭐ ** v1.0.9 — Unified Redis Client API**
1057+
1058+ ### 🔧 Added
1059+
1060+ * ` src/Contracts/Redis/RedisClientInterface.php `
1061+ * Unified driver-agnostic Redis interface:
1062+ * ` get `
1063+ * ` set `
1064+ * ` del `
1065+ * ` keys `
1066+
1067+ ### ✔ Updated
1068+
1069+ * ` README.md `
1070+ * ` README.full.md `
1071+ * ` CHANGELOG.md ` → v1.0.9
1072+ * ` VERSION ` → ** 1.0.9**
1073+ * Roadmap (phase17)
1074+ * Full phase doc → ` docs/phases/README.phase17.md `
1075+
1076+ ### 🧪 Tests
1077+
1078+ * Verified compatibility with FakeRedisConnection
1079+ * Signature-safe with Predis/PhpRedis mocks
1080+ * No breaking changes
1081+
1082+ ## 🧩 Final Status
1083+
1084+ ** Phase 17 is completed successfully.**
1085+ Unified RedisClientInterface is now part of maatify/common and ready for integration with the ecosystem.
1086+
1087+ ---
1088+
9621089
9631090# 🧾 ** Release Verification — v1.0.8 (Phase 16)**
9641091
0 commit comments