Skip to content

Commit

Permalink
Merge pull request #711 from doctrine/4.2.x-merge-up-into-5.0.x_ouqcWgwJ
Browse files Browse the repository at this point in the history
Merge release 4.2.1 into 5.0.x
  • Loading branch information
driehle authored Feb 4, 2022
2 parents 772010a + 59405c0 commit 3525562
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/Service/ConfigurationFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
7 changes: 5 additions & 2 deletions tests/Service/ConfigurationFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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());
}
}
1 change: 0 additions & 1 deletion tests/Service/DBALConnectionFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3525562

Please sign in to comment.