a4sex/key-value-storage
A simple key-value storage package for Laravel/PHP that lets you persist and retrieve arbitrary values through a clean, unified API. Useful for settings, caches, and lightweight configuration without the overhead of a full database model.
Architecture fit
psr/cache) implementation. PSR-6 is a mature PHP-FIG contract, so the interface fits anywhere — but Laravel already ships an adapter in the opposite direction (Illuminate\Cache\Psr6\CacheAdapter), letting any existing Laravel store satisfy CacheItemPoolInterface. For a standard Laravel app this package is therefore a duplicate abstraction, not a missing capability.illuminate/cache, or a bounded module where you want a cache contract with no framework coupling.symfony/cache — which is battle-tested, widely deployed, and already a transitive Laravel dependency — approaches zero.Integration feasibility
repositories entry with type: vcs (or a private Composer/Satis mirror), plus GitLab token auth in CI and in every developer environment. That is non-trivial friction for a library that solves an already-solved problem.^ constraint, unless the repo demonstrably follows SemVer with tags.Technical risk
composer audit, and most SCA scanners will not see it. Vulnerabilities and abandoned dependencies become invisible to your existing controls. This is the single largest risk and it is process-level, not code-level.psr/cache constraint (^1.0 | ^2.0 | ^3.0 in modern Laravel). PSR-6 v2/v3 tightened method signatures; a package pinned to ^1.0 will conflict with Laravel 10/11 and force a resolution hack. Also check PHP version floor and required extensions.Key questions for the maintainer / spike
CacheItemPoolInterface?psr/cache major versions and PHP versions are supported, and is there a CI matrix proving it?Stack fit
Illuminate\Contracts\Cache\Repository, and Laravel has no built-in PSR-6 → Store adapter. Wiring it into config/cache.php requires a hand-written Store shim — pure added risk for no gain.$this->app->singleton(CacheItemPoolInterface::class, ...) scoped to that module's service provider only.Migration path
App\Contracts\KeyValueStore) with a IlluminateCacheStore implementation as the default and this package as an alternate binding. This makes the dependency reversible in one commit and is the mitigation that makes the whole evaluation tolerable.Compatibility
psr/cache constraint compatibility first; this is the most likely hard blocker.symfony/cache, predis/predis, or phpredis if backend adapters are bundled.opcache in production, not just in the dev container.Sequencing
composer.json, README, and tests. Answer the seven questions above. Kill the evaluation early if it is a thin wrapper.App\Contracts\KeyValueStore, implement it once against Cache::store() and once against this package.symfony/cache genuinely lacks. Default expectation: do not adopt; use Illuminate\Cache\Psr6\CacheAdapter or symfony/cache and close the ticket.Maintenance
psr/cache v4 lands on your team.Support
Scaling
increment/decrement and no tag invalidation. Rate limiters, counters, and bulk-invalidation patterns will need bespoke work. Plan for that explicitly.Failure modes
Ramp-up
How can I help you explore Laravel packages today?