-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Use Doctrine MetadataCache if a cache is not set #2407
Use Doctrine MetadataCache if a cache is not set #2407
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2407 +/- ##
============================================
+ Coverage 80.47% 80.49% +0.01%
- Complexity 3152 3154 +2
============================================
Files 159 159
Lines 8160 8167 +7
============================================
+ Hits 6567 6574 +7
Misses 1593 1593
Continue to review full report at Codecov.
|
251a8af
to
c0695aa
Compare
05bf050
to
ea05421
Compare
0da83b4
to
8305832
Compare
8305832
to
f105358
Compare
|
||
$this->expectDeprecationWithIdentifier('https://github.com/doctrine/persistence/issues/184'); | ||
} else { | ||
$this->expectDeprecation('Doctrine\Persistence\Mapping\AbstractClassMetadataFactory::getCacheDriver is deprecated. Use getCache() instead.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not use getCache
instead of the deprecated API when it is available ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
because AbstractClassMetadataFactory::getCache()
is protected: https://github.com/doctrine/persistence/blob/f8af155c1e7963f3d2b4415097d55757bbaa53d8/lib/Doctrine/Persistence/Mapping/AbstractClassMetadataFactory.php#L119
I'm a bit concern about performance after #2373 because before that, the cache was shared among the listeners and now it should be set externally.
I've created stof/StofDoctrineExtensionsBundle#436 to try to solve it for the bundle.
In the meantime, instead of creating a new
ArrayAdapter
as fallback, I think we can go back to doctrine metadata cache so everything should work as before.I'll try later today to add a test andafter this I'm fine releasing3.5.0
.