DoctrineModule icon indicating copy to clipboard operation
DoctrineModule copied to clipboard

Deprecate doctrine/cache and add symfony/cache

Open Koen1999 opened this issue 3 years ago • 3 comments

doctrine/cache v2.0.0 was released about a year ago and it's probably a good idea if doctrine/doctrine-module adds support for doctrine/cache ^2.

https://github.com/doctrine/cache/releases/tag/2.0.0

Koen1999 avatar Jun 09 '22 13:06 Koen1999

Please have a look at Doctrine cache's docs on what v2.0 actually is: https://www.doctrine-project.org/projects/doctrine-cache/en/2.2/index.html. There are no cache adapters/implementations anymore, just a few interfaces.

So what would you suggest should be implemented on the side of DoctrineModule?

driehle avatar Jun 10 '22 12:06 driehle

Probably it's a good idea to switch to another cache provider like the one from Symfony as suggested in the docs. https://github.com/symfony/cache

Koen1999 avatar Jun 11 '22 10:06 Koen1999

Please provide a PR adding support for symfony/cache. I'll be happy to review and merge your PR.

driehle avatar Jul 04 '22 11:07 driehle

@driehle Maybe I'm misunderstanding something here, but why add symfony/cache here when that module is for Laminas and laminas-cache is already required?

https://github.com/doctrine/DoctrineModule/blob/a970728caed33236a53fd7f829ffebaeeb63b34c/composer.json#L48

froschdesign avatar Dec 09 '22 09:12 froschdesign

Yes, you're right. I was rather thinking of adding symfony/cache as a second alternative. Currently, laminas-cache and doctrine/cache can be used, so laminas-cache and symfony/cache could be a replacement. Nevertheless, we should probably make one step at a time, so simply dropping/deprecating doctrine/cache would be the easiest step forward.

driehle avatar Dec 09 '22 09:12 driehle

@driehle can it be done in next release ? 5.4 or 6.0 if BC ? it's currently blocking 5.3 release for no real reason

fezfez avatar Dec 09 '22 11:12 fezfez

I'd like to have at least the deprecations in 5.3.0. I have already started working on this, so we'll still be able to release 5.3.0 over the weekend.

driehle avatar Dec 09 '22 12:12 driehle

Done in https://github.com/doctrine/DoctrineModule/releases/tag/6.0.0

TomHAnderson avatar May 10 '23 19:05 TomHAnderson