diff --git a/composer.json b/composer.json index c7aa6fa6..89994f90 100644 --- a/composer.json +++ b/composer.json @@ -52,7 +52,7 @@ "doctrine/doctrine-laminas-hydrator": "^2.2.1 || ^3.0.0", "doctrine/doctrine-module": "^5.0.0", "doctrine/event-manager": "^1.1.1", - "doctrine/orm": "^2.9.6", + "doctrine/orm": "^2.11.1", "doctrine/persistence": "^2.2.3", "laminas/laminas-eventmanager": "^3.4.0", "laminas/laminas-modulemanager": "^2.11.0", diff --git a/src/Service/ConfigurationFactory.php b/src/Service/ConfigurationFactory.php index 2a011cbc..18a13a33 100644 --- a/src/Service/ConfigurationFactory.php +++ b/src/Service/ConfigurationFactory.php @@ -135,7 +135,7 @@ public function __invoke(ContainerInterface $serviceLocator, $requestedName, ?ar } // As Second Level Cache caches queries results, we reuse the result cache impl - $cacheFactory = new DefaultCacheFactory($regionsConfig, $config->getResultCacheImpl()); + $cacheFactory = new DefaultCacheFactory($regionsConfig, $config->getResultCache()); $cacheFactory->setFileLockRegionDirectory($secondLevelCache->getFileLockRegionDirectory()); $cacheConfiguration = new CacheConfiguration(); diff --git a/tests/Service/ConfigurationFactoryTest.php b/tests/Service/ConfigurationFactoryTest.php index 23c5b7bc..61e1fa85 100644 --- a/tests/Service/ConfigurationFactoryTest.php +++ b/tests/Service/ConfigurationFactoryTest.php @@ -5,6 +5,7 @@ namespace DoctrineORMModuleTest\Service; use Doctrine\Common\Cache\ArrayCache; +use Doctrine\Common\Cache\Psr6\CacheAdapter; use Doctrine\ORM\Cache\CacheConfiguration; use Doctrine\ORM\Cache\DefaultCacheFactory; use Doctrine\ORM\Mapping\ClassMetadataFactory; @@ -345,8 +346,10 @@ public function testCanInstantiateWithSecondLevelCacheConfig(): void // Doctrine does not allow to retrieve the cache adapter from cache factory, so we are forced to use // reflection here - $reflProperty = new ReflectionProperty($cacheFactory, 'cache'); + $reflProperty = new ReflectionProperty($cacheFactory, 'cacheItemPool'); $reflProperty->setAccessible(true); - $this->assertInstanceOf(ArrayCache::class, $reflProperty->getValue($cacheFactory)); + $cacheDecorator = $reflProperty->getValue($cacheFactory); + $this->assertInstanceOf(CacheAdapter::class, $cacheDecorator); + $this->assertInstanceOf(ArrayCache::class, $cacheDecorator->getCache()); } } diff --git a/tests/Service/DBALConnectionFactoryTest.php b/tests/Service/DBALConnectionFactoryTest.php index 20bb9c5e..b590e6d2 100644 --- a/tests/Service/DBALConnectionFactoryTest.php +++ b/tests/Service/DBALConnectionFactoryTest.php @@ -121,7 +121,6 @@ public function testDoctrineAddCustomCommentedType(): void $type = Type::getType($platform->getDoctrineTypeMapping('money')); $this->assertInstanceOf(MoneyType::class, $type); - $this->assertTrue($platform->isCommentedDoctrineType($type)); } public function testGettingPlatformFromContainer(): void