PHPackages                             jdwx/kv - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. jdwx/kv

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jdwx/kv
=======

v1.0.0(1y ago)07PHPPHP ^8.3

Since Mar 25Pushed 1y ago1 watchersCompare

[ Source](https://github.com/jdwx/kv-php)[ Packagist](https://packagist.org/packages/jdwx/kv)[ RSS](/packages/jdwx-kv/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

kv-php
======

[](#kv-php)

PHP module for abstracting key-value stores.

Installation
------------

[](#installation)

You can require it directly with Composer:

```
composer require jdwx/kv
```

Or download the source from GitHub:

Requirements
------------

[](#requirements)

This module requires PHP 8.3 or later.

There are some optional dependencies. The PdoKV class requires the PDO extension. The SqliteKV class also requires pdo\_sqlite. The JsonWrapper class requires jdwx/json and the json extension. The CacheInterfaceKV class requires the CacheInterface PSR.

These are not listed as dependencies in composer.json because there are very few cases where you need them all at once. If you need them, you can require them directly.

Usage
-----

[](#usage)

This module is designed to provide a simple interface for key-value stores, both persistent and in-memory. For example, it provides the solution to "I really need a simple persistent key-value store here, but I don't want to mess with the SQLite API."

The key-value interface is provided (almost) entirely through the ArrayAccess interface. I.e., you can just treat your key-value store like an array. And you're done.

The basic classes (PdoKV, SqliteKV, ArrayKV) provide a key-value store for strings only. The JsonWrapper and SerializeWrapper classes are provided to support more complex datatypes. The TTLWrapper class provides a key-value store with time-to-live support.

The CacheInterfaceKV class is provided to allow you to use any PSR-16 cache as a key-value store. It's useful if you've already got one. ("I told them we've already got one!")

Stability
---------

[](#stability)

This module is relatively new and has not been extensively deployed in production yet. That said, its reliance on the ArrayAccess interface should make it incredibly stable, at least for all but the most exotic functionality.

History
-------

[](#history)

This module was created in early 2025 to replace several ad-hoc implementations. (Now there are 15 competing standards...)

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance46

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

419d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f71b4b976170f89eac19be48c7381a27c49ed8c9cb5e8e6ff05a2ad7583efa13?d=identicon)[jdwx](/maintainers/jdwx)

---

Top Contributors

[![jdwx](https://avatars.githubusercontent.com/u/2722779?v=4)](https://github.com/jdwx "jdwx (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jdwx-kv/health.svg)

```
[![Health](https://phpackages.com/badges/jdwx-kv/health.svg)](https://phpackages.com/packages/jdwx-kv)
```

###  Alternatives

[mobiledetect/mobiledetectlib

Mobile\_Detect is a lightweight PHP class for detecting mobile devices. It uses the User-Agent string combined with specific HTTP headers to detect the mobile environment.

10.7k159.4M431](/packages/mobiledetect-mobiledetectlib)[illuminate/contracts

The Illuminate Contracts package.

704122.9M10.1k](/packages/illuminate-contracts)[phiki/phiki

Syntax highlighting using TextMate grammars in PHP.

3573.0M23](/packages/phiki-phiki)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k20](/packages/civicrm-civicrm-core)[flow-php/etl

PHP ETL - Extract Transform Load - Abstraction

374468.4k51](/packages/flow-php-etl)[gehrisandro/tailwind-merge-php

TailwindMerge for PHP merges multiple Tailwind CSS classes by automatically resolving conflicts between them

1391.5M9](/packages/gehrisandro-tailwind-merge-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
