Skip to content

3.0.0

Closed Nov 13, 2021 100% complete

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.

Added

  • Adds PHP 8.1 support to laminas-cache
  • PSR-6 CacheItemPoolDecorator now validates the maximum key length
  • Each cache adapter now has to be imp…

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.

Added

  • Adds PHP 8.1 support to laminas-cache
  • PSR-6 CacheItemPoolDecorator now validates the maximum key length
  • Each cache adapter now has to be implicitly required by a project

Removed

  • StorageFactory and PatternFactory were removed
  • ClassCache pattern was removed while there is no alternative
  • Both PatternCacheFactory and StoragePatternCacheFactory (introduced in v2.12.0) in order to provide forward compatibility for v3.0.0 are removed
  • PatternPluginManager 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 anymore
  • The PluginManagerLookupTrait which was used to provide forward compatibility for the StorageAdapterFactoryInterface

Breaking Changes

  • CallbackCache, OutputCache and ObjectCache now require the underlying cache adapter (StorageInterface) as 1st __construct dependency. The options can be passed via 2nd __construct)[https://github.com/CallbackCache, OutputCache and ObjectCache now require the underlying cache adapter (StorageInterface arguments but are optional.
    Please note that it is not possible to inject the pattern configuration as an array anymore
  • Storage configurations must be in a specific shape. For more details, head to the release notes of 2.12.0
  • All cache adapters are now marked as 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.
  • Due to the enhancement of CacheItemPoolDecorator, the maximum key length for the underlying cache adapter is validated before it is passed to the adapter.
  • The SerializationTrait which was meant to be used by both PSR-6 and PSR-16 decorators is now marked as internal.
  • The 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.

This milestone is closed.

No open issues remain. View closed issues or see open milestones in this repository.