Try to install laminas-cache in a MVC application

Hi,

Using the skeleton MVC application en want to use the caching. I tried to install the cache using composer.

Laminas cache is using psr/cache ^1.0, but Laminas MVC requires ^3.0.

How can I use the laminas cache in the mvc? I’ve done it before, but now it won’t work.

PS. I also included the filesystem adapter.

The error:
laminas/laminas-cache[3.12.0, …, 3.12.1] require psr/cache ^1.0 → found psr/cache[1.0.0, 1.0.1] but it conflicts with your root composer.json require (^3.0).

Hello and welcome to our forums! :smiley:

laminas-mvc does not require any cache also not the psr/cache in version 3.
Please check with the why command of Composer which other package needs this dependencies.

I thought so.

I don’t know how, but in the composer.lock there was an entry for psr/cache ^3.0. I removed the lock file and did a composer update, now it works.

Works nice now! Thanx.