mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
Deprecate using doctrine/cache for metadata caching #6700
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @alcaeus on GitHub (Apr 22, 2021).
Originally assigned to: @alcaeus on GitHub.
With doctrine/cache being sunset, and doctrine/persistence supporting PSR-6 caches in metadata factories, it's time to update the ORM configuration class to also accept PSR-6 caches. When setting up the metadata factory, the adapters provided in doctrine/cache should be used to avoid calling deprecated methods in doctrine/persistence.
@nataniel commented on GitHub (Jun 24, 2021):
https://www.doctrine-project.org/projects/doctrine-orm/en/2.9/reference/advanced-configuration.html
The documentation says to use:
but the dependency on doctrine/orm 2.9.3 is:
"doctrine/cache": "^1.11.3|^2.0.3",and 2.0.3 removed ArrayCache.
So I'm not really sure what is the current state and I cannot find any proper documentation on how to configure EntityManager :(
@StrikeAgainst commented on GitHub (Jul 27, 2021):
Same goes for
PhpFileCache, which has also been removed, but the documentation still suggests to use it for caching. Supposedlysymfony/cacheis a recommended substitute, but I can find no documentation on how to get it working with Doctrine. I hope someone fixes the current documentation soon... For now I'll downgradedoctrine/cacheI guess.@ghdi commented on GitHub (Jul 28, 2021):
@nataniel / @StrikeAgainst
This worked for me: