Update doctrine packages and fix metadata cache

[MAILPOET-3658]
This commit is contained in:
Rostislav Wolny
2021-06-16 14:39:31 +02:00
committed by Veljko V
parent b6d420b19c
commit c9603b76dc
6 changed files with 503 additions and 360 deletions

View File

@@ -32,7 +32,8 @@ class TablePrefixMetadataFactory extends ClassMetadataFactory {
// prefix tables only after they are saved to cache so the prefix does not get included in cache
// (getMetadataFor can call itself recursively but it saves to cache only after the recursive calls)
$isCached = ($cache = $this->getCacheDriver()) ? $cache->contains($classMetadata->getName() . $this->cacheSalt) : false;
$cacheKey = $this->getCacheKey($classMetadata->getName());
$isCached = ($cache = $this->getCache()) ? $cache->hasItem($cacheKey) : false;
if ($classMetadata instanceof ClassMetadata && $isCached) {
$this->addPrefix($classMetadata);
$this->prefixedMap[$classMetadata->getName()] = true;