cache/doctrine-adapter
This package adapts legacy Doctrine\Common\Cache implementations to PSR-6 and PSR-16, letting existing Doctrine caches work with modern cache pools. Version 3 changes the tagged-item format, so drain workers and clear the cache before upgrading or rolling back.
cache/doctrine-adapter is a thin, MIT-licensed, ~single-class adapter (DoctrineCachePool) that makes a Doctrine\Common\Cache\* provider consumable through PSR-6 (Psr\Cache\CacheItemPoolInterface). The only decision it genuinely accelerates is "do we build a Doctrine→PSR-6 shim ourselves, or vendor one?" If you already have Doctrine 1.x cache providers wired into ORM/DBAL metadata or query caches and a modern PSR-6 consumer (Laravel's Illuminate\Cache\Repository, PSR-6 middleware, a third-party library that type-hints the PSR-6 interface), this package removes a day or two of glue code and replaces it with a maintained, spec-compliant shim. That is the whole value proposition — and it is a small one.CacheItemPoolInterface) in front of an existing Doctrine driver so that cache consumers stop caring which backend is underneath. This supports a roadmap story of "single cache contract across services," but it does not support a story of "modernize our cache layer" — the adapter sits on top of the very layer that needs modernizing. Treat it as scaffolding for a migration, with an explicit expiry date.Cache::tags() semantics are not guaranteed to map cleanly.MemcachedCache, RedisCache, ApcuCache).doctrine/cache 1.x (ORM/DBAL metadata, query, or result caches) that you cannot remove within this planning horizon.Doctrine\Common\Cache\Cache instance.doctrine/cache 2.x or later. Doctrine moved away from the Doctrine\Common\Cache\Cache interface toward PSR-6/PSR-16; this adapter targets the legacy interface. Verify the exact supported constraint before scoping anything; a mismatch here invalidates the entire evaluation.redis, memcached, database, dynamodb are first-class, tested by the framework, and support Cache::tags() natively. Wrapping Doctrine to reach Memcached/Redis through a read-only adapter with zero dependents is a strict downgrade in support surface for zero functional gain.symfony/cache (which itself adapts Doctrine caches and is actively maintained) or cache/adapter-bundle-style ecosystem alternatives are safer bets. Prefer a package with real dependents and a release cadence over one with 13 stars and a read-only flag.doctrine/cache constraint against your installed tree, (b) validates PSR-6 key-character constraints ({}()/\@: are rejected — Laravel-generated keys like model:123 contain : and must be sanitized), (c) proves or disproves tag behavior, and (d) benchmarks against the native driver. If the spike shows no behavioral gap versus native drivers, the correct decision is to not adopt.To executives (one paragraph): We evaluated a small open-source adapter that lets our existing Doctrine cache drivers speak the standard PSR-6 caching interface. It is a bridge, not a platform: it costs nothing to license, removes a little bespoke glue code in a narrow legacy scenario, and carries a support risk because the project is read-only with negligible adoption. Our recommendation is to treat it as migration scaffolding, not an architectural commitment — approve it only inside a time-boxed integration where we already depend on Doctrine's legacy cache, and only with a documented plan to remove it in favor of a natively supported cache driver. It should not appear on a roadmap as a capability.
To engineering (briefing bullets):
DoctrineCachePool — wraps any Doctrine\Common\Cache\Cache provider and exposes it as a PSR-6 CacheItemPoolInterface. One class, MIT, part of the php-cache org.{}()/\@: in keys, so our existing key generation (Eloquent-style model:123) needs sanitization; the adapter adds an indirection layer over the driver, so benchmark before assuming parity; and the repo is read-only with 13 stars and 0 dependents, so assume we own any fixes.symfony/cache.How can I help you explore Laravel packages today?