NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist
Packagist, #1751 most downloaded on Packagist
Caching implementation with a variety of storage options, as well as codified caching strategies for callbacks, classes, and output
Latest stable
4.3.0
Last release 2 months ago
13 Sep 2026
Release timing varies
gaps range from 4 weeks to 13 months
Most releases are documented
notes for 47 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
7 years old
125 releases · first in 2019
Drag across the ruler to compare, or tap a release to open it.
Total pull requests resolved: 2
Feature release (minor)
Total pull requests resolved: 2
Feature release (minor)
Your coding agent can read these notes before it upgrades. Set up the MCP server →
Total pull requests resolved: 5
Feature release (minor)
Total pull requests resolved: 3
max_items Memory adapter option thanks to @boesingFilesystemOptions related to Filesystem v3.0 thanks to @boesingTotal pull requests resolved: 1
Total pull requests resolved: 1
4.0.x bugfix release (patch)
StorageInterface usage thanks to @boesingTotal pull requests resolved: 1
4.0.x bugfix release (patch)
StorageInterface thanks to @boesing309: Remove deprecated configuration support thanks to @boesing
laminas-cache 4.0.0 is here and finally adds native types everywhere, adds support for psr/cache and psr/simple-cache v2 & v3 and introduces an all new metadata logic which allows adapters to provide metadata they actually support.
Please read more on how to migrate your project in our migration guideline.
metadata now implements MetadataCapableInterface and provides a dedicated object containing all the metadata values it supportspsr/cache and psr/simple-cache v2 & v3supportedMetadata capability from CapabilitiesKeyListIterator::CURRENT_AS_METADATA mode along with Laminas\Cache\Exception\MissingKeyExceptionSerializerInterface when calling PluginOptions#getSerializerStorageInterface, so there is no more StorageInterface#incrementItem, StorageInterface#decrementItem, StorageInterface#decrementItems and StorageInterface#incrementItems
incrementItem, incrementItems, decrementItem, derementItems events (pre, post and exception)laminas/laminas-cache-storage-adapter-implementation which now allows laminas-cache to be required without a concrete storage adapter implementationpsr/cache and psr/simple-cache v1AbstractAdapter and StorageInterface are not aware of the methods getMetadata anymore. These were moved to the new MetadataCapableInterfaceCapabilities do not provide supportedMetadata anymore. The supported metadata is tied to the used storage adapter and thus, was already requiring projects to explicitly know the exact implementation of the cache backend in case of using these metadatas anywayKeyListIterator and the corresponding IteratorInterface does not provide the mode CURRENT_AS_METADATA anymorePluginOptions#getSerializer does not create a serializer anymore if a string option was passed, instead, the string is returnedStorageInterface, so there is no more StorageInterface#incrementItem, StorageInterface#decrementItem, StorageInterface#decrementItems and StorageInterface#incrementItems
incrementItem, incrementItems, decrementItem, derementItems events (pre, post and exception)ObjectCache does not inherit the CallbackCache pattern anymorefinal to a bunch of classes thanks to @boesingCapabilities as a read-only class thanks to @boesinglaminas/laminas-servicemanager v4 thanks to @boesingMetadataCapableInterface thanks to @boesingnon-empty-string thanks to @boesinglaminas/laminas-feed dev-dependency thanks to @boesingvimeo/psalm to v5.20.0 thanks to @boesinglaminas/laminas-cache-storage-implementation thanks to @boesingvimeo/psalm to v5.16 once available thanks to @boesingincrement and decrement functionality thanks to @boesingSerializer plugin has to serialize token to enable StorageInterface#checkAndSetItem comparing the correct values thanks to @boesing414: replace methods deprecated in 8.5 thanks to @earthiverse
3.14.x bugfix release (patch)
README.md does not work thanks to @boesingTotal pull requests resolved: 1
Feature release (minor)
Total pull requests resolved: 1
Total pull requests resolved: 1
3.12.x bugfix release (patch)
ssl_context option to RedisCluster documentation thanks to @boesingTotal pull requests resolved: 1
3.12.x bugfix release (patch)
Total pull requests resolved: 1
AdapterPluginManager is now configurable via storage_adapters
Feature release (minor)
AdapterPluginManager is now configurable via storage_adaptersPSR-20laminas/laminas-servicemanager version was raised to 3.21.0AdapterPluginManager via config file thanks to @rohm1stella-maris/clock with psr/clock thanks to @boesingTotal pull requests resolved: 2
3.10.x bugfix release (patch)
Total issues resolved: 0
Total pull requests resolved: 2
Total contributors: 2
259: Merge release 3.9.1 into 3.10.x thanks to @github-actions[bot]
Total pull requests resolved: 1
Feature release (minor)
servicemanager minimum to 3.18.0 thanks to @gsteelTotal pull requests resolved: 1
Total pull requests resolved: 1
Feature release (minor)
Total pull requests resolved: 1
Feature release (minor)
Total pull requests resolved: 2
Feature release (minor)
Total pull requests resolved: 1
Feature release (minor)
Total pull requests resolved: 4
Feature release (minor)
Total pull requests resolved: 1
Feature release (minor)
Clock interface for PSR-6 operations thanks to @boesingTotal pull requests resolved: 1
Feature release (minor)
Cache items which get expired by using CacheItemInterface#expiresAfter now start expiring immediately after calling that method. Prior this release, t
Feature release (minor)
CacheItemInterface#expiresAfter now start expiring immediately after calling that method. Prior this release, they started to expire after passing them to either CacheItemPoolInterface#save or in case they were passed to CacheItemPoolInterface#saveDeferred after calling CacheItemPoolInterface#commitCacheItem for PSR-6 needs to start expiring after calling CacheItemInterface#expiresAfter thanks to @boesingTotal pull requests resolved: 1
3.1.x bugfix release (patch)
Total pull requests resolved: 1
3.1.x bugfix release (patch)
In 3.1.0, we released a BC compatibility for v2.12.0+. Sadly we had a slip there and thus the changes were applied to the StoragePluginFactoryInterfac
3.1.x bugfix release (patch)
StoragePluginFactoryInterface instead of the StorageAdapterFactoryInterface. This release reverts these changes and applies the BC compatibility to the proper factory.With this release, we are also deprecating the name array configuration key which has to be adapter.
Feature release (minor)
adapter as a compatible array key for storage adapter configurations. This will provide support for the array structure which had to be changed in v2 of laminas-cache to be compatible with the v3 release. This was somehow changed in v3 without backporting it to v2 and thus, this change will provide better support for components which have to provide support for both v2 and v3name array configuration key which has to be adapter.Total pull requests resolved: 1
3.0.x bugfix release (patch)
93: Remove `PatternFactory` as it was marked as deprecated in v2.11.0 thanks to @boesing
laminas-cache 3.0.0 is here and finally enables projects to only require those cache adapters which are actually used by the project.
Please read more on how to migrate your project in our migration guideline.
laminas-cacheCacheItemPoolDecorator now validates the maximum key lengthStorageFactory and PatternFactory were removedClassCache pattern was removed while there is no alternativePatternCacheFactory and StoragePatternCacheFactory (introduced in v2.12.0) in order to provide forward compatibility for v3.0.0 are removedPatternPluginManager and PatternPluginManagerFactory were removed since most pattern require an underlying cache adapter which must now be passed via dependency injection rather than an option. Therefore, the PatternOptions are not capable of the storage option anymoreCallbackCache, OutputCache and ObjectCache now require the underlying cache adapter (StorageInterface) as 1st __construct dependency. The options can be passed via 2nd __construct argument but are optional.final and are not extensible anymore. In case that you are extending one of the cache adapters, please change your code as composition should be preferred over inheritance. For an example, please check out the composition over inheritance section.CacheItemPoolDecorator, the maximum key length for the underlying cache adapter is validated before it is passed to the adapter.SerializationTrait which was meant to be used by both PSR-6 and PSR-16 decorators is now marked as internal.PCRE_MAXIMUM_QUANTIFIER_LENGTH constant of the SimpleCacheDecorator (which was marked as internal) has now been moved to the new (also internal) MaximumKeyLengthTrait and thus had to become a public static property (as traits do not support constants).All compatible satellite packages which do support laminas-cache v3 can be found here.
ClassCache pattern thanks to @boesingStorageAdapterFactoryInterface thanks to @boesingStorageItem::setItems for CacheItemPoolDecorator::commit thanks to @boesingSimpleCacheDecorator#convertIterableToArray converts float to integer array keys thanks to @boesingAdapterOptions thanks to @boesingAbstractAdapter thanks to @boesingPatternFactory as it was marked as deprecated in v2.11.0 thanks to @boesingTotal pull requests resolved: 1
2.13.x bugfix release (patch)
Total pull requests resolved: 1
2.13.x bugfix release (patch)
The already deprecated PatternFactory no longer suggests the PatternPluginManager as an alternative.
Feature release (minor)
PatternFactory no longer suggests the PatternPluginManager as an alternative.PatternPluginManager as with v3.0.0, cache pattern do require strict dependency injection. Since most of the cache pattern depend on a storage implementation, which are not longer known by this component as of v3, a dynamic factory for the cache pattern won't be suitable anymore.PatternCacheFactory and StoragePatternCacheFactory which were introduced in v2.12.0 to provide forward compatibility for the new StorageCapableInterface implementing patterns.PatternPluginManager and related factories introduced in 2.12.x for BC compatibility thanks to @boesingTotal pull requests resolved: 1
2.12.x bugfix release (patch)
$options in StoragePluginFactory thanks to @boesingWith 2.12.0, a better key length handling for the PSR-16 decorator was introduced. The decorator initially supported 64 characters which was the minim
2.12.x bugfix release (patch)
With 2.12.0, a better key length handling for the PSR-16 decorator was introduced. The decorator initially supported 64 characters which was the minimum which PSR-16 requires to be supported by implementing cache backends. The redis adapter can take keys up to a length of 512 MB which results in a PCRE2 compilation error when validating the cache key length with the PSR-16 decorator.
This release decreases the maximum allowed key length for the PSR-16 decorator to 65534 to avoid that compilation error. Technically, this would be a BC break, but given the fact that cache adapters with a support for keys bigger than that ran into the compilation error when validating the cache keys, this is rather a necessary bugfix.
PSR-16 decorator is now 65534PSR-16 decorator, preg_match won't result in a compilation error for cache adapters which would support even longer keys.This component now only provides the laminas-cli config for CLI commands when symfony/console is available.
2.12.x bugfix release (patch)
laminas-cli config for CLI commands when symfony/console is available.Instead of using the StorageFactory (which is marked as deprecated in this release), the StorageAdapterFactory (StorageAdapterFactoryInterface) should…
Feature release (minor)
This release focuses on providing forward compatibility to the next major release of this component.
With laminas/laminas-cache v3, using static factories for the adapters won't be possible anymore as this component wont be aware of which storage adapters are around.
All storage adapters will have to populate themselves to the AdapterPluginManager.
Instead of using the StorageFactory (which is marked as deprecated in this release), the StorageAdapterFactory (StorageAdapterFactoryInterface) should be used. It provides StorageAdapterFactoryInterface#createFromArrayConfiguration which consumes the exact same (normalized¹) configuration as StorageFactory#factory.
There are also replacements for the other methods of the StorageFactory:
StorageAdapterFactoryInterface#create is a replacement for StorageFactory#adapterFactoryStoragePluginFactoryInterface is a replacement for the StorageFactory#pluginFactoryTo verify that your projects configuration is compatible with the new normalized¹ configuration, you can use laminas/laminas-cli with the CLI command laminas-cache:deprecation:check-storage-factory-config.
laminas-cli command to check project configuration for deprecated storage configuration.StorageAdapterFactoryInterface which is retrievable via the PSR-11 container when this component is used with either laminas/laminas-mvc or mezzio/mezzio.CacheItemPoolDecorator#saveDeferred queued already expired cache items. This has been fixed and thus, the method will return false for cache items which are already expired.Serializer plugin treated non-existent cache items as an error and thus did not incremented/decremented these values. Non-existent values must be treated as 0 as this is how adapters handle the increment/decrement when not used with the Serializer plugin.ExceptionInterface now extends the Throwable interface.CallbackCache, ObjectCache and ClassCache simplified method calls by avoiding the usage of call_user_func* functions.PSR-16 decorator now uses the maximum key length capability to better reflect the PSR requirements. PSR-16 requires that the backend supports at least 64 characters but it may also allow more than 64 characters.StorageFactory in favor of StorageAdapterFactoryInterface and StoragePluginFactoryInterface.StorageAdapterFactoryInterface.maximum key length capability in combination with the PSR-16 decorator.¹ Normalized array configuration example
[
'adapter' => 'apcu',
'options' => ['ttl' => 3600],
'plugins' => [
[
'name' => 'exception_handler',
'options' => [
'throw_exceptions' => false,
],
],
],
];
0 when incrementing/decrementing items thanks to @boesing\Exception fallback for PSR-16 decorator thanks to @boesingStorageFactory options thanks to @boesingClassCache pattern as deprecated thanks to @boesingPatternOptions storage option thanks to @boesingStorageAdapterFactory to v2 thanks to @boesingAdded a laminas-cli command to check project configuration for deprecated storage configuration.
Feature release (minor)
laminas-cli command to check project configuration for deprecated storage configuration.CacheItemPoolDecorator#saveDeferred queued already expired cache items. This has been fixed and thus, the method will return false for cache items which are already expired.Serializer plugin treated non-existent cache items as an error and thus did not incremented/decremented these values. Non-existent values must be treated as 0 as this is how adapters handle the increment/decrement when not used with the Serializer plugin.ExceptionInterface now extends the Throwable interface.CallbackCache, ObjectCache and ClassCache simplified method calls by avoiding the usage of call_user_func* functions.PSR-16 decorator now uses the maximum key length capability to better reflect the PSR requirements. PSR-16 requires that the backend supports at least 64 characters but it may also allow more than 64 characters.StorageAdapterFactoryInterface.maximum key length capability in combination with the PSR-16 decorator.Added a laminas-cli command to check project configuration for deprecated storage configuration.
Feature release (minor)
laminas-cli command to check project configuration for deprecated storage configuration.ExceptionInterface now extends the Throwable interface.CallbackCache, ObjectCache and ClassCache simplified method calls by avoiding the usage of call_user_func* functions.PSR-16 decorator now uses the maximum key length capability to better reflect the PSR requirements. PSR-16 requires that the backend supports at least 64 characters but it may also allow more than 64 characters.StorageAdapterFactoryInterface.maximum key length capability in combination with the PSR-16 decorator.Total pull requests resolved: 1
2.11.x bugfix release (patch)
Fixes a bug where decrementing a single key in combination with the Serializer plugin actually incremented the value
2.11.x bugfix release (patch)
Serializer plugin actually incremented the valueRedisCluster adapter which is available in laminas/laminas-cache-storage-adapter-redis v1.2.0Fixes a PSR-6 deletion regression which was introduced in 2.10.2. The CacheItemPoolDecorator now verifies that all keys are absent from the storage. T
2.11.x bugfix release (patch)
PSR-6 deletion regression which was introduced in 2.10.2. The CacheItemPoolDecorator now verifies that all keys are absent from the storage. This is now in sync with the SimpleCacheDecorator.Total issues resolved: 0
Total pull requests resolved: 1
Total contributors: 1
101: Merge release 2.10.3 into 2.11.x thanks to @github-actions[bot]
PatternFactory has been marked as deprecated. Instead of using static factories like this, receiving the PatternPluginManager is recommended.
This release aims to support PHP 8.0 for laminas-cache.
In laminas-cache v2.10.0, adapters were split into their very own components without receiving any changes. These changes were necessary to keep laminas-cache maintainable long term as development can now be focused on these adapters rather than the whole ecosystem.
Most of these adapters will not receive support for PHP 8.0, so they are likely blocking users from migrating to PHP 8.0 if the projects won't start to prepare for laminas-cache v3.0.0 which requires all projects to require those adapters they really use. With laminas-cache v2.10+, composer comes to the rescue and enables users to start prepare their project by explicitly use a require entry for those adapters which are in use while "removing" adapters, they don't.
To achieve this, the replace section of the projects composer.json has to list all adapters which are not used.
An example configuration can be found either in the installation section of the laminas documentation or in the README.md of this package.
laminas-servicemanager and laminas-eventmanager in their v2 versionsPatternFactory has been marked as deprecated. Instead of using static factories like this, receiving the PatternPluginManager is recommended.PatternFactory as deprecated thanks to @boesingFixes a PSR-6 deletion regression which was introduced in 2.10.2. The CacheItemPoolDecorator now verifies that all keys are absent from the storage. T
2.10.x bugfix release (patch)
PSR-6 deletion regression which was introduced in 2.10.2. The CacheItemPoolDecorator now verifies that all keys are absent from the storage. This is now in sync with the SimpleCacheDecorator.The decorator for PSR-6 CacheItemPool assumed that a deletion was successful even if the underlying storage failed to delete these items.
2.10.x bugfix release (patch)
CacheItemPool assumed that a deletion was successful even if the underlying storage failed to delete these items.composer.json for required cache adapters thanks to @boesingAdded documentation for BlackHole Adapter
2.10.x bugfix release (patch)
BlackHole AdapterBlackHole adapter docs thanks to @boesing21: Added plugin interfaces and marked `EventsCapableInterface` as deprecated thanks to @boesing
As decided within the TSC meeting in November 2020, v2.10 is the last minor version in the v2 series.
PluginAwareInterface and PluginCapableInterface to provide better typehinting against plugin capable storage adaptersStorageFactory has to create a custom StorageAdapterInterface implementation which does not extend the AbstractAdapter, the factory will trigger a deprecation message due to the missing PluginAwareInterface implementation when a plugins configuration was provided.Initial release to introduce laminas-cache-storage-adapter-* satellite packages
laminas/laminas-cache-storage-adapter-zend-server thanks to @boesinglaminas/laminas-cache-storage-adapter-xcache thanks to @boesinglaminas/laminas-cache-storage-adapter-wincache thanks to @boesinglaminas/laminas-cache-storage-adapter-session thanks to @boesinglaminas/laminas-cache-storage-adapter-redis thanks to @boesinglaminas/laminas-cache-storage-adapter-mongodb thanks to @boesinglaminas/laminas-cache-storage-adapter-memory thanks to @boesinglaminas/laminas-cache-storage-adapter-memcached thanks to @boesinglaminas/laminas-cache-storage-adapter-memcache thanks to @boesinglaminas/laminas-cache-storage-adapter-filesystem thanks to @boesinglaminas/laminas-cache-storage-adapter-ext-mongodb thanks to @boesinglaminas/laminas-cache-storage-adapter-dba thanks to @boesinglaminas/laminas-cache-storage-adapter-blackhole thanks to @boesinglaminas/laminas-cache-storage-adapter-apcu thanks to @boesinglaminas/laminas-cache-storage-adapter-apc thanks to @boesingEventsCapableInterface as deprecated thanks to @boesing### Added - #21 Adds new PluginAwareInterface and PluginCapableInterface to provide better typehinting against plugin capable storage adapters - #40 A
PluginAwareInterface and PluginCapableInterface to provide better typehinting against plugin capable storage adaptersStorageFactory has to create a custom StorageAdapterInterface implementation which does not extend the AbstractAdapter, the factory will trigger a deprecation message due to the missing PluginAwareInterface implementation when a plugins configuration was provided.Release candidate to preview upcoming v2.10.0 release.
Release candidate to preview upcoming v2.10.0 release.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per quarter.