cache/array-adapter
In-memory PSR-6 and PSR-16 cache pool for tests and short-lived scripts, with tags, hierarchical keys, and an optional item limit. Values last only for the current PHP process.
array cache store that works through the Cache facade with zero new dependencies. This package only earns its place if we specifically need a PSR-6 CacheItemPoolInterface, which Laravel's native store does not provide. Framed correctly, the decision is "do we need a PSR-6 interop shim?" — not "which cache should we run?"[READ-ONLY] as a split of php-cache/cache, and a coverage badge pointing at the wrong repository. This is a low-blast-radius, low-maintenance dependency — acceptable scoped to require-dev, unacceptable as an anchor for production architecture. Recording it explicitly prevents a future "why is this in here?" audit cycle.Adopt it (dev-only) when all of the following are true:
Psr\Cache\CacheItemPoolInterface — the answer to this question decides the whole evaluation.ArrayCachePool by concrete class, so the test double can be swapped for symfony/cache or a real PSR-6 pool without touching domain code.Look elsewhere — or do nothing — when:
array store for tests and close the evaluation. Every added dependency is a future upgrade tax; this one buys nothing if the interface is never used.symfony/cache's ArrayAdapter is PSR-6 and PSR-16, actively maintained, and has Redis/filesystem siblings behind the same interfaces — a live upgrade path rather than a dead end.To executives: This is a small, free, MIT-licensed test utility — not a caching platform. It lets engineers test cache-dependent code without running cache servers in CI, which trims pipeline cost and flakiness. It carries no production risk because it will never run in production; the total exposure is one dev dependency that can be swapped with a one-line binding change. Approve it as a scoped engineering-hygiene decision, not a strategic bet.
To engineering: Use it as a dev-only PSR-6 test double, and only where PSR-6 is actually type-hinted. Bind Psr\Cache\CacheItemPoolInterface in the container; never reference ArrayCachePool by concrete class outside the test base class and service provider. Enforce that boundary with an architecture test (ban the namespace outside tests/) so it cannot drift into a production code path during a "temporary" fix. Where PSR-6 is required and the package must survive long-term, prefer symfony/cache's ArrayAdapter for its maintained upgrade path.
The one-paragraph decision to record: We will use Laravel's native array store as the default test cache. We will add cache/array-adapter as a dev dependency only where PSR-6-typed code exists, always behind a container binding, with a documented sunset trigger: if upstream PHP support lags our CI matrix, swap the binding to symfony/cache — no domain code changes required. That framing keeps the answer cheap to reverse, which is the only thing that matters for a dependency this small.
How can I help you explore Laravel packages today?