Skip to content

v1.0.10 — Generic KeyValue Storage Contract (Phase 18)

Choose a tag to compare

@Maatify Maatify released this 09 Dec 07:08
· 1 commit to main since this release

This release introduces the KeyValueAdapterInterface, a generic, storage-agnostic key–value behavior contract that cleanly separates business logic from Redis protocol specifics across the Maatify ecosystem.

It completes the architectural split between:

  • Protocol layer → RedisClientInterface (Phase 17)
  • Behavior layer → KeyValueAdapterInterface (Phase 18)

✨ Highlights

  • ✅ Introduced KeyValueAdapterInterface as the universal KV behavior contract

  • ✅ Decoupled Security Guard and Rate Limiter from Redis-specific APIs

  • ✅ Enabled strict PHPStan max-level typing for all KV-based drivers

  • ✅ Unified behavior across:

    • Redis adapters
    • FakeRedisConnection
    • In-memory KV drivers
  • ✅ Fully backward compatible — no breaking changes


📦 Added

New Contract:

src/Contracts/Adapter/KeyValueAdapterInterface.php

Methods:

  • get(string $key): mixed
  • set(string $key, mixed $value, ?int $ttl = null): void
  • del(string $key): void

🛠 Updated

  • README.md

  • README.full.md

  • CHANGELOG.md

  • roadmap.json

  • VERSION → 1.0.10

  • Added phase documentation:

    docs/phases/README.phase18.md
    

🧪 Testing & Quality

  • ✅ Security Guard KV behavior verified
  • ✅ Rate Limiter TTL & counters verified
  • ✅ No regressions in Locking System
  • ✅ PHPStan validated at max level
  • ✅ PHPUnit passing with existing test suite

🧭 Ecosystem Impact

This release is now a required foundation for:

  • maatify/security-guard
  • maatify/rate-limiter
  • Upcoming cache, OTP, and session storage systems

It ensures:

  • Clean architecture
  • Driver-agnostic KV storage
  • Deterministic fake vs real driver behavior