doctrine / cache

Doctrine Cache component
https://www.doctrine-project.org/projects/cache.html
MIT License
7.85k stars 214 forks source link

Fix the PSR-6 wrapping for doctrine caches with a namespace #381

Closed stof closed 3 years ago

stof commented 3 years ago

If a namespace is set in a DoctrineProvider cache, we cannot unwrap the inner PSR-6 cache pool, as that would loose the namespacing feature. We need to add an additional wrapper instead.

Closes #380

stof commented 3 years ago

Note that the ORM setup class should still be updated to apply the namespace on the PSR-6 layer directly when using the DoctrineProvider, to allow migrating away from it.

And I think we should probably trigger a deprecation when setting a non-empty namespace in the DoctrineProvider, as getting rid of doctrine/cache implies moving the needed namespacing to the PSR-6 layer. What do you think @alcaeus ?

greg0ire commented 3 years ago

I think Andreas is busy. @derrabus , maybe you could give this an additional review? It could be nice to release this bugfix with the other one I merged today.

derrabus commented 3 years ago

The fix looks correct, but I think I would want a test case for that.