Skip to content

Add support for doctrine/cache:v2 #110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Oct 30, 2023

Conversation

Slamdunk
Copy link
Collaborator

Supersedes #72 as I'm not able to push on that branch.

Yevhen Vilkhovchenko and others added 4 commits October 30, 2023 08:59
1. Doctrine (orm, dbal etc.) going to use PSR-6|PSR-16, so doctrine/cache drop own cache implementations which previously could be instantiated in CacheFactory according to config in "doctrine.cache.{$cacheType}". Now only 'class' key supported to either get as service from container or className to be instantiated.
2. ConfigurationFactory lost usage of cache by default, see "doctrine.configuration.{$entityManagerName}" keys:
  - 'metadata_cache'
  - 'query_cache'
  - 'result_cache'
  - 'hydration_cache'
  because no 'array' implementation
3. Left 'array' and 'filesystem' caches in full-config.php as example how to migrate to symfony/cache
4. Remove unused $configuration argument from ConfigurationFactory::processCacheImplementation()
…ctory

1. doctrine/orm Configuration class and its parent from doctrine/dbal does not support null in cache setters
2. To avoid `if` in ConfigurationFactory create NullCache implementation of PSR-6 interface.
Avoid Doctrine\Common\Cache\Psr6\CacheItem (create own NullCacheItem) because someday we can remove "doctrine/cache" dependency
3. No type-hinting in NullCache and item to be compatible with "psr/cache:^1.0.1"
@Slamdunk Slamdunk added enhancement New feature or request BC BREAK This PR contains a BC break; major version should be incremented labels Oct 30, 2023
@Slamdunk Slamdunk added this to the 4.0.0 milestone Oct 30, 2023
@Slamdunk Slamdunk self-assigned this Oct 30, 2023
@Slamdunk Slamdunk merged commit e53f82c into Roave:4.0.x Oct 30, 2023
@Slamdunk Slamdunk deleted the support-persistence-3 branch October 30, 2023 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BC BREAK This PR contains a BC break; major version should be incremented enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants