PHPSocialNetwork / phpfastcache

A high-performance backend cache system. It is intended for use in speeding up dynamic web applications by alleviating database load. Well implemented, it can drops the database load to almost nothing, yielding faster page load times for users, better resource utilization. It is simple yet powerful.
https://www.phpfastcache.com
MIT License
2.36k stars 452 forks source link

Psr16Adapter not compatible with psr/simple-cache 3.0.0? #847

Closed therealsamsquanch closed 2 years ago

therealsamsquanch commented 2 years ago

I have psr/simple-cache 3.0.0 installed.

I'm using mimmi20/BrowserDetector, it requires a PSR-16 compatible cache, so I'm passing phpfastcache's PSR-16 adapter. It used to work fine with phpfastcache 8.x and psr/simple-cache 1.0.0

Geolim4 commented 2 years ago

Hello,

By looking the expected signature: Psr\SimpleCache\CacheInterface::get($key, $default = ) you're not using 3.0.0 but 2.0.0.

therealsamsquanch commented 2 years ago

It's weird, because I confirmed that 3.0.0 was installed by using composer show. I went back to phpfastcache 8.1.0 and psr/simple-cache automatically reverted to 1.0.1. Everything is working again.

Geolim4 commented 2 years ago

Always clear the composer cache before using composer show :)