Skip to content

Commit 3525562

Browse files
authored
Merge pull request #711 from doctrine/4.2.x-merge-up-into-5.0.x_ouqcWgwJ
Merge release 4.2.1 into 5.0.x
2 parents 772010a + 59405c0 commit 3525562

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"doctrine/doctrine-laminas-hydrator": "^2.2.1 || ^3.0.0",
5353
"doctrine/doctrine-module": "^5.0.0",
5454
"doctrine/event-manager": "^1.1.1",
55-
"doctrine/orm": "^2.9.6",
55+
"doctrine/orm": "^2.11.1",
5656
"doctrine/persistence": "^2.2.3",
5757
"laminas/laminas-eventmanager": "^3.4.0",
5858
"laminas/laminas-modulemanager": "^2.11.0",

src/Service/ConfigurationFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public function __invoke(ContainerInterface $serviceLocator, $requestedName, ?ar
135135
}
136136

137137
// As Second Level Cache caches queries results, we reuse the result cache impl
138-
$cacheFactory = new DefaultCacheFactory($regionsConfig, $config->getResultCacheImpl());
138+
$cacheFactory = new DefaultCacheFactory($regionsConfig, $config->getResultCache());
139139
$cacheFactory->setFileLockRegionDirectory($secondLevelCache->getFileLockRegionDirectory());
140140

141141
$cacheConfiguration = new CacheConfiguration();

tests/Service/ConfigurationFactoryTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
namespace DoctrineORMModuleTest\Service;
66

77
use Doctrine\Common\Cache\ArrayCache;
8+
use Doctrine\Common\Cache\Psr6\CacheAdapter;
89
use Doctrine\ORM\Cache\CacheConfiguration;
910
use Doctrine\ORM\Cache\DefaultCacheFactory;
1011
use Doctrine\ORM\Mapping\ClassMetadataFactory;
@@ -345,8 +346,10 @@ public function testCanInstantiateWithSecondLevelCacheConfig(): void
345346

346347
// Doctrine does not allow to retrieve the cache adapter from cache factory, so we are forced to use
347348
// reflection here
348-
$reflProperty = new ReflectionProperty($cacheFactory, 'cache');
349+
$reflProperty = new ReflectionProperty($cacheFactory, 'cacheItemPool');
349350
$reflProperty->setAccessible(true);
350-
$this->assertInstanceOf(ArrayCache::class, $reflProperty->getValue($cacheFactory));
351+
$cacheDecorator = $reflProperty->getValue($cacheFactory);
352+
$this->assertInstanceOf(CacheAdapter::class, $cacheDecorator);
353+
$this->assertInstanceOf(ArrayCache::class, $cacheDecorator->getCache());
351354
}
352355
}

tests/Service/DBALConnectionFactoryTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ public function testDoctrineAddCustomCommentedType(): void
121121
$type = Type::getType($platform->getDoctrineTypeMapping('money'));
122122

123123
$this->assertInstanceOf(MoneyType::class, $type);
124-
$this->assertTrue($platform->isCommentedDoctrineType($type));
125124
}
126125

127126
public function testGettingPlatformFromContainer(): void

0 commit comments

Comments
 (0)