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.
Architecture fit
cache/array-adapter is a PSR-6/PSR-16 in-memory pool backed by a PHP array. From a TPM lens, the key architectural constraint is a protocol mismatch with Laravel's cache layer: Laravel's Cache facade and Illuminate\Contracts\Cache\Repository are PSR-16/Store-shaped, not PSR-6. This package implements Psr\Cache\CacheItemPoolInterface, so it cannot be dropped in as a Laravel cache store without a custom Store wrapper. That means the package is not a caching strategy — it is an interop boundary artifact.
The second constraint is redundancy: Laravel already ships an array store (CACHE_STORE=array) that is request-scoped, TTL-aware, and zero-config. For most Laravel work, this package is architecturally unnecessary. The narrow but legitimate fit is code that type-hints PSR-6 — third-party SDKs, framework-agnostic domain libraries, or an internal abstraction deliberately written against PSR-6 for portability.
Integration feasibility
Half a day to a day, dev-only, low value at the start. composer require --dev cache/array-adapter plus a single container binding in the test base class ($this->app->instance(CacheItemPoolInterface::class, new ArrayCachePool())). It is not feasible as a production store under any configuration — state dies with the request, there is no cross-process sharing, and there is no eviction by default.
Technical risk Dominant risk is organizational, not technical. The class is trivially instantiable, so it can drift into a production code path during an expedient fix. Secondary risks:
[READ-ONLY] subtree split of php-cache/cache; fixes land upstream in a project we are not tracking. No independent velocity.Key questions a TPM must get answered before committing
CacheItemPoolInterface / Psr\Cache is the single decision gate. If zero hits, close this as "not needed."php-cache/cache monorepo? Metadata is inconsistent — the package record's last release date conflicts with prior internal notes. One of these is wrong and it changes the risk profile materially.Stack fit
Recommend --dev only, scoped to the test suite, and only if the PSR-6 question is answered "yes." For everything else, use the native array store as the dev/test default — no new dependency, TTL-correct, already understood by the team.
Where PSR-6 is genuinely required, evaluate symfony/cache's ArrayAdapter as the baseline instead: it is PSR-6 and PSR-16, actively maintained, and has first-class Redis/filesystem siblings behind the same interfaces. That gives a credible production migration target. Choosing this package over symfony/cache buys only a marginally smaller dependency and costs a dead-end upgrade path.
Migration path Position the package as the start of an interface chain, not the destination:
Psr\Cache\CacheItemPoolInterface in the container. Never reference ArrayCachePool by concrete class outside the service provider and the test base class.ArrayCachePool (or ArrayAdapter).Compatibility Two checks before committing budget:
composer.json require constraint covers our CI matrix (current PHP 8.x minors) and pin it. Given the thin release history, treat each PHP minor bump as a re-check task in the upgrade runbook.php-cache/integration-tests against it once in CI so spec gaps surface as a test failure rather than as a framework bug during a release.Sequencing
CacheItemPoolInterface / Psr\Cache. Assign an engineer, one-day timebox.array store; do not add this dependency," and close the ticket.Maintenance
Near-zero day-to-day cost, non-zero stewardship cost. Because it is a read-only split, we cannot patch locally without forking or vendoring. Stand up a quarterly review: is the upstream monorepo still releasing? Does it support the latest PHP minor? If either flips, remediation is a one-line binding change to symfony/cache — which is precisely why the interface-binding discipline matters more than the package choice.
Support
No vendor, no SLA, no commercial backing. Community support is a low-traffic Gitter channel tied to the php-cache organisation. Assign internal ownership to the platform/backend team that owns the test harness, with the explicit expectation that "support" means "we replace it if it breaks," not "we file an issue and wait."
Scaling
Not applicable in the production sense — the pool does not share, persist, or scale. The scaling concern that does apply is intra-process: under Octane/Swoole workers, entries accumulate across requests since eviction is only on write past an optional cap. Two mitigations to budget for: (a) an architecture/static-analysis rule (PHPStan or an Ark test) banning the Cache\Adapter\PHPArray namespace outside tests/, and (b) explicit clear() in long-running test fixtures.
Failure modes to plan against
Ramp-up
Minutes. composer require --dev cache/array-adapter, new ArrayCachePool(), standard PSR-6 methods (getItem, save, hasItem, clear). Any PHP engineer is productive on day one. The real onboarding need is not "how to use it" but "when not to use it" — capture that as a one-paragraph ADR plus a code-level guard rather than relying on tribal knowledge.
Recommendation: Do not adopt as a platform dependency. Adopt selectively as a dev-only test binding if and only if PSR-6-typed code exists; otherwise standardize on Laravel's native array store for tests, with symfony/cache ArrayAdapter as the PSR-6 baseline where framework-agnosticism is a stated requirement. The package is technically sound and operationally trivial, but read-only split status, empty changelogs, zero dependents, and direct overlap with Laravel built-ins make it a dependency adopted for compatibility reasons better served elsewhere.
How can I help you explore Laravel packages today?