doctrine/cache
49.5
Weak · 13 November 2026
1k
lines of production code
PHP
primary language
7
measurements over time
What this system is
Features
Add PSR-6 cache adapter and provider
The library now includes a PSR-6 cache adapter and provider, enabling interoperability with PSR-6 cache implementations. This adds new classes in the \lib/Doctrine/Common/Cache/Psr6\ directory, including \CacheAdapter\, \CacheItem\, \TypedCacheItem\, and \DoctrineProvider\, allowing users to wrap or be wrapped by PSR-6 cache pools.
lib/Doctrine/Common/Cache/Psr6 · high confidence
Introduces multi-operation cache interfaces and base provider
The Doctrine Common Cache library now provides dedicated interfaces for multi-get, multi-put, and multi-delete operations, allowing cache drivers to implement bulk retrieval and removal of cache entries. A new \MultiOperationCache\ interface combines these capabilities, and the abstract \CacheProvider\ base class implements these interfaces, enabling drivers to support efficient batched cache operations.
lib/Doctrine/Common/Cache · high confidence
Behavioural changes
Deprecate all cache implementations and introduce PSR-6/PSR-16 adapters
All existing cache implementations (such as ApcCache, ArrayCache, MemcacheCache, and XcacheCache) are now marked as deprecated and will be removed in version 2.0. To facilitate migration, the package now includes PSR-6 and PSR-16 adapter classes (CacheAdapter and DoctrineProvider) that allow wrapping existing Doctrine cache implementations with modern standards, or wrapping PSR-6 caches as legacy Doctrine cache instances.
(repo-wide) · high confidence
Test coverage
Added base test case class for Doctrine tests; Added test coverage for PSR-6 cache adapter and provider; Added test suite for the ArrayCache driver and CacheProvider behavior.
Dependencies
Doctrine Cache library marked as abandoned and updated for modern PHP/PSR standards
The \doctrine/cache\ package is now marked as abandoned, signaling that users should migrate to alternative caching solutions. The library's \composer.json\ has been updated to require PHP 7.1 or 8.0, and dev dependencies have been upgraded to support PSR-4 autoloading, PHPUnit 7.5/8.5/9.5, and PSR-3/PSR-6/PSR-16 compatible cache interfaces.
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 52 → 50 (-2.8)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.
Lenses
- Code Health 71 → 64 (-6.7)
- Architecture 69 → 69 (+0.0)
- Maturity 41 → 37 (-4.1)
- Readiness 55 → 55 (+0.0)
- Security 75 → 75 (+0.0)
Resolved (4)
- Inconsistent naming for retrieval operations. The base Cache interface uses fetch for single item retrieval, while PSR-6 adapters use getItem/getItems. Furthermore, CacheProvider implements fetch but also exposes fetchMultiple. The mix of fetch (Doctrine legacy) and get/getItem (PSR-6 standard) across related types creates a fragmented API surface where the same intent (retrieving data) is expressed differently depending on the interface level.
- Inconsistent naming for storage operations. Cache and CacheProvider use save, while PSR-6 adapters use save/saveDeferred. However, MultiPutCache uses saveMultiple while MultiGetCache uses fetchMultiple. The inconsistency lies in the verb choice: save vs put (implied by MultiPutCache name, though method is saveMultiple). More critically, CacheProvider has save and saveMultiple, but MultiOperationCache is empty, suggesting a fragmented design where multi-operation capabilities are split across multiple interfaces rather than a unified MultiCache interface.
- Semantic ambiguity between flush and delete operations. CacheProvider exposes both flushAll() and deleteAll(), while ClearableCache only exposes deleteAll(). In caching contexts, 'flush' often implies clearing the cache structure (potentially invalidating keys but keeping the backend alive), while 'delete' might imply removing specific keys or the entire store. Having both on the same class with no clear distinction in naming convention creates confusion about whether they are aliases or distinct operations.
- Typo in constant naming. STATS_MEMORY_AVAILIABLE is a misspelling of STATS_MEMORY_AVAILABLE. This creates redundancy where consumers might use either, leading to inconsistent codebases.
New (2)
- Edited copy of a member (12 corresponding lines) (lib/Doctrine/Common/Cache/Psr6/CacheItem.php)
- Edited copy of a member (14 corresponding lines) (lib/Doctrine/Common/Cache/Psr6/CacheItem.php)
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
doctrine/cache was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 13 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit e0a9919443c1e918251c23b65eddd9a66fafacb3 — the exact code this score is about.
- Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-859b6d22580d.