From 634a3004b32e47780590b5396c6ec308711b92e5 Mon Sep 17 00:00:00 2001 From: Brandon Legault Date: Wed, 18 Jan 2017 16:52:25 -0500 Subject: [PATCH 01/10] Implement multiple cache driver support in EntityManagerFactory --- src/EntityManagerFactory.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/EntityManagerFactory.php b/src/EntityManagerFactory.php index 09aefd0d..ad79e95b 100644 --- a/src/EntityManagerFactory.php +++ b/src/EntityManagerFactory.php @@ -93,10 +93,17 @@ public function create(array $settings = []) { $configuration = $this->setup->createConfiguration( array_get($settings, 'dev', false), - array_get($settings, 'proxies.path'), - $this->cache->driver() + array_get($settings, 'proxies.path') ); + $queryDriver = $this->cache->driver($this->config->get('doctrine.cache.query.type')); + $resultDriver = $this->cache->driver($this->config->get('doctrine.cache.result.type')); + $metaDriver = $this->cache->driver($this->config->get('doctrine.cache.metadata.type')); + + $configuration->setQueryCacheImpl($queryDriver); + $configuration->setResultCacheImpl($resultDriver); + $configuration->setMetadataCacheImpl($metaDriver); + $this->setMetadataDriver($settings, $configuration); $driver = $this->getConnectionDriver($settings); @@ -319,7 +326,8 @@ protected function setCustomFunctions(Configuration $configuration) protected function setCacheSettings(Configuration $configuration) { if ($namespace = $this->config->get('doctrine.cache.namespace', null)) { - $this->cache->driver()->setNamespace($namespace); + $drv = $this->cache->driver(); + $drv->setNamespace($namespace); } $this->setSecondLevelCaching($configuration); From c93a9f48475409e4a5bb6531237a88b31657996a Mon Sep 17 00:00:00 2001 From: Brandon Legault Date: Thu, 19 Jan 2017 09:09:16 -0500 Subject: [PATCH 02/10] Make all EntityManagerFactory tests pass (may not be correct yet) --- tests/EntityManagerFactoryTest.php | 29 +++++++++++++++++++++++++---- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/tests/EntityManagerFactoryTest.php b/tests/EntityManagerFactoryTest.php index 839e15d6..002acf4d 100644 --- a/tests/EntityManagerFactoryTest.php +++ b/tests/EntityManagerFactoryTest.php @@ -207,7 +207,7 @@ public function test_second_level_caching_can_be_enabled() ->atLeast()->once()->andReturn($cacheConfig); $this->cacheImpl = m::mock(Cache::class); - $this->cache->shouldReceive('driver')->once()->andReturn($this->cacheImpl); + $this->cache->shouldReceive('driver')->andReturn($this->cacheImpl); $this->configuration->shouldReceive('isSecondLevelCacheEnabled') ->atLeast()->once() @@ -226,11 +226,12 @@ public function test_custom_cache_namespace_can_be_set() $this->disableSecondLevelCaching(); $this->config->shouldReceive('get') - ->with('doctrine.cache.namespace', null)->once() + ->with('doctrine.cache.namespace', null) + ->once() ->andReturn('namespace'); $cache = m::mock(Cache::class); - $this->cache->shouldReceive('driver')->once()->andReturn($cache); + $this->cache->shouldReceive('driver')->andReturn($cache); $cache->shouldReceive('setNamespace')->once()->with('namespace'); @@ -477,6 +478,21 @@ protected function mockConfig() { $this->config = m::mock(Repository::class); + $this->config->shouldReceive('get') + ->with('doctrine.cache.query.type') + ->once() + ->andReturn('array'); + + $this->config->shouldReceive('get') + ->with('doctrine.cache.metadata.type') + ->once() + ->andReturn('array'); + + $this->config->shouldReceive('get') + ->with('doctrine.cache.result.type') + ->once() + ->andReturn('array'); + $this->config->shouldReceive('has') ->with('database.connections.mysql') ->once() @@ -505,7 +521,7 @@ protected function mockConfig() protected function mockCache() { $this->cache = m::mock(CacheManager::class); - $this->cache->shouldReceive('driver')->once()->andReturn(new ArrayCache()); + $this->cache->shouldReceive('driver')->times(3)->andReturn(new ArrayCache()); } protected function mockConnection() @@ -595,6 +611,11 @@ protected function mockORMConfiguration() ->atLeast()->once() ->andReturn('Doctrine\ORM\Mapping\ClassMetadataFactory'); + $this->configuration->shouldReceive('setMetadataCacheImpl')->once(); + $this->configuration->shouldReceive('setQueryCacheImpl')->once(); + $this->configuration->shouldReceive('setResultCacheImpl')->once(); + + $cache = m::mock(Cache::class); $this->configuration->shouldReceive('getMetadataCacheImpl') ->atLeast()->once() From 94edfabcf01c5d6515b56deabbeba6fe23cfe0dd Mon Sep 17 00:00:00 2001 From: Brandon Legault Date: Thu, 19 Jan 2017 11:29:54 -0500 Subject: [PATCH 03/10] Refactor the EntityManagerFactory to properly make use of cache drivers and second level caching --- src/EntityManagerFactory.php | 38 ++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/src/EntityManagerFactory.php b/src/EntityManagerFactory.php index ad79e95b..9ff742ff 100644 --- a/src/EntityManagerFactory.php +++ b/src/EntityManagerFactory.php @@ -57,6 +57,14 @@ class EntityManagerFactory */ private $resolver; + /** + * @var array + */ + private $defaultCache = [ + 'type' => 'array', + 'namespace' => null + ]; + /** * @param Container $container * @param Setup $setup @@ -96,14 +104,6 @@ public function create(array $settings = []) array_get($settings, 'proxies.path') ); - $queryDriver = $this->cache->driver($this->config->get('doctrine.cache.query.type')); - $resultDriver = $this->cache->driver($this->config->get('doctrine.cache.result.type')); - $metaDriver = $this->cache->driver($this->config->get('doctrine.cache.metadata.type')); - - $configuration->setQueryCacheImpl($queryDriver); - $configuration->setResultCacheImpl($resultDriver); - $configuration->setMetadataCacheImpl($metaDriver); - $this->setMetadataDriver($settings, $configuration); $driver = $this->getConnectionDriver($settings); @@ -325,14 +325,27 @@ protected function setCustomFunctions(Configuration $configuration) */ protected function setCacheSettings(Configuration $configuration) { - if ($namespace = $this->config->get('doctrine.cache.namespace', null)) { - $drv = $this->cache->driver(); - $drv->setNamespace($namespace); - } + $configuration->setQueryCacheImpl($this->applyNamedCacheConfiguration('query')); + $configuration->setResultCacheImpl($this->applyNamedCacheConfiguration('result')); + $configuration->setMetadataCacheImpl($this->applyNamedCacheConfiguration('metadata')); $this->setSecondLevelCaching($configuration); } + private function applyNamedCacheConfiguration($cacheName) + { + $defaultDriver = $this->config->get('doctrine.cache.default.type', $this->defaultCache['type']); + $defaultNamespace = $this->config->get('doctrine.cache.default.namespace', $this->defaultCache['namespace']); + + $driverType = $this->config->get('doctrine.cache.'.$cacheName.'.type', $defaultDriver); + + if ($namespace = $this->config->get('doctrine.cache.'.$cacheName.'.namespace', $defaultNamespace)) { + $this->cache->driver($driverType)->setNamespace($namespace); + } + + return $this->cache->driver($driverType); + } + /** * @param Configuration $configuration */ @@ -349,6 +362,7 @@ protected function setSecondLevelCaching(Configuration $configuration) ) ); } + } /** From 26334ff901222c979bad1d7303d19e5d9f4be035 Mon Sep 17 00:00:00 2001 From: Brandon Legault Date: Thu, 19 Jan 2017 15:43:24 -0500 Subject: [PATCH 04/10] Fix unit tests for EntityManagerFactory to reflect new EMF code --- tests/EntityManagerFactoryTest.php | 75 +++++++++++++++++++++--------- 1 file changed, 52 insertions(+), 23 deletions(-) diff --git a/tests/EntityManagerFactoryTest.php b/tests/EntityManagerFactoryTest.php index 002acf4d..775169d0 100644 --- a/tests/EntityManagerFactoryTest.php +++ b/tests/EntityManagerFactoryTest.php @@ -74,6 +74,11 @@ class EntityManagerFactoryTest extends PHPUnit_Framework_TestCase protected $setup; + /** + * @var array + */ + protected $caches = [ 'query', 'result', 'metadata' ]; + /** * @var array */ @@ -91,8 +96,19 @@ class EntityManagerFactoryTest extends PHPUnit_Framework_TestCase protected $cacheImpl; + /** + * @Notes This just holds the length of $caches + * It's just here so we don't have to call count($caches) over and over. + * @var int + */ + private $cachesCount; + protected function setUp() { + + //Just store the count of caches + $this->cachesCount = count($this->caches); + $this->mockApp(); $this->mockMeta(); $this->mockConnection(); @@ -112,6 +128,7 @@ protected function setUp() $this->config, $this->listenerResolver ); + } protected function assertEntityManager(EntityManagerInterface $manager) @@ -207,7 +224,8 @@ public function test_second_level_caching_can_be_enabled() ->atLeast()->once()->andReturn($cacheConfig); $this->cacheImpl = m::mock(Cache::class); - $this->cache->shouldReceive('driver')->andReturn($this->cacheImpl); + $this->cache->shouldReceive('driver') + ->once()->andReturn($this->cacheImpl); $this->configuration->shouldReceive('isSecondLevelCacheEnabled') ->atLeast()->once() @@ -226,14 +244,24 @@ public function test_custom_cache_namespace_can_be_set() $this->disableSecondLevelCaching(); $this->config->shouldReceive('get') - ->with('doctrine.cache.namespace', null) - ->once() - ->andReturn('namespace'); + ->with('doctrine.cache.default.namespace', null) + ->andReturn('namespace'); + + foreach($this->caches as $cache) + { + $this->config->shouldReceive('get') + ->with('doctrine.cache.'.$cache.'.namespace', 'namespace') + ->once() + ->andReturn('namespace'); + } + $cache = m::mock(Cache::class); - $this->cache->shouldReceive('driver')->andReturn($cache); + $this->cache->shouldReceive('driver') + ->times($this->cachesCount) + ->andReturn($cache); - $cache->shouldReceive('setNamespace')->once()->with('namespace'); + $cache->shouldReceive('setNamespace')->with('namespace'); $manager = $this->factory->create($this->settings); @@ -478,20 +506,14 @@ protected function mockConfig() { $this->config = m::mock(Repository::class); - $this->config->shouldReceive('get') - ->with('doctrine.cache.query.type') - ->once() - ->andReturn('array'); - - $this->config->shouldReceive('get') - ->with('doctrine.cache.metadata.type') - ->once() - ->andReturn('array'); + foreach(array_merge($this->caches, ['default']) as $cache) + { + $this->config->shouldReceive('get') + ->with('doctrine.cache.'.$cache.'.type', 'array') + ->atLeast()->once() + ->andReturn('array'); + } - $this->config->shouldReceive('get') - ->with('doctrine.cache.result.type') - ->once() - ->andReturn('array'); $this->config->shouldReceive('has') ->with('database.connections.mysql') @@ -521,7 +543,9 @@ protected function mockConfig() protected function mockCache() { $this->cache = m::mock(CacheManager::class); - $this->cache->shouldReceive('driver')->times(3)->andReturn(new ArrayCache()); + $this->cache->shouldReceive('driver') + ->times($this->cachesCount) + ->andReturn(new ArrayCache()); } protected function mockConnection() @@ -580,9 +604,14 @@ protected function disableSecondLevelCaching() protected function disableCustomCacheNamespace() { - $this->config->shouldReceive('get') - ->with('doctrine.cache.namespace', null)->atLeast()->once() - ->andReturn(false); + foreach(array_merge($this->caches, ['default']) as $cache) + { + $this->config->shouldReceive('get') + ->with('doctrine.cache.'.$cache.'.namespace', null) + ->atLeast()->once() + ->andReturn(null); + } + } protected function disableCustomFunctions() From 3cb3d4fbe1f522bd5b8f4e33559a153792b0bc06 Mon Sep 17 00:00:00 2001 From: Brandon Legault Date: Thu, 19 Jan 2017 16:37:34 -0500 Subject: [PATCH 05/10] Fix the default cache implementation to ensure backwards compatibility --- src/EntityManagerFactory.php | 4 ++-- tests/EntityManagerFactoryTest.php | 16 +++++++++++++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/EntityManagerFactory.php b/src/EntityManagerFactory.php index 9ff742ff..e1be2569 100644 --- a/src/EntityManagerFactory.php +++ b/src/EntityManagerFactory.php @@ -334,8 +334,8 @@ protected function setCacheSettings(Configuration $configuration) private function applyNamedCacheConfiguration($cacheName) { - $defaultDriver = $this->config->get('doctrine.cache.default.type', $this->defaultCache['type']); - $defaultNamespace = $this->config->get('doctrine.cache.default.namespace', $this->defaultCache['namespace']); + $defaultDriver = $this->config->get('doctrine.cache.default', $this->defaultCache['type']); + $defaultNamespace = $this->config->get('doctrine.cache.namespace', $this->defaultCache['namespace']); $driverType = $this->config->get('doctrine.cache.'.$cacheName.'.type', $defaultDriver); diff --git a/tests/EntityManagerFactoryTest.php b/tests/EntityManagerFactoryTest.php index 775169d0..45c8a176 100644 --- a/tests/EntityManagerFactoryTest.php +++ b/tests/EntityManagerFactoryTest.php @@ -244,7 +244,7 @@ public function test_custom_cache_namespace_can_be_set() $this->disableSecondLevelCaching(); $this->config->shouldReceive('get') - ->with('doctrine.cache.default.namespace', null) + ->with('doctrine.cache.namespace', null) ->andReturn('namespace'); foreach($this->caches as $cache) @@ -506,7 +506,12 @@ protected function mockConfig() { $this->config = m::mock(Repository::class); - foreach(array_merge($this->caches, ['default']) as $cache) + $this->config->shouldReceive('get') + ->with('doctrine.cache.default', 'array') + ->atLeast()->once() + ->andReturn('array'); + + foreach($this->caches as $cache) { $this->config->shouldReceive('get') ->with('doctrine.cache.'.$cache.'.type', 'array') @@ -604,7 +609,12 @@ protected function disableSecondLevelCaching() protected function disableCustomCacheNamespace() { - foreach(array_merge($this->caches, ['default']) as $cache) + $this->config->shouldReceive('get') + ->with('doctrine.cache.namespace', null) + ->atLeast()->once() + ->andReturn(null); + + foreach($this->caches as $cache) { $this->config->shouldReceive('get') ->with('doctrine.cache.'.$cache.'.namespace', null) From e8a2f169dc714a2b786cf582c917d338571bebc6 Mon Sep 17 00:00:00 2001 From: Brandon Legault Date: Fri, 20 Jan 2017 10:29:46 -0500 Subject: [PATCH 06/10] Fix formatting for StyleCI build --- src/EntityManagerFactory.php | 7 +++---- tests/EntityManagerFactoryTest.php | 16 +++++++--------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/EntityManagerFactory.php b/src/EntityManagerFactory.php index e1be2569..583bbfa1 100644 --- a/src/EntityManagerFactory.php +++ b/src/EntityManagerFactory.php @@ -334,12 +334,12 @@ protected function setCacheSettings(Configuration $configuration) private function applyNamedCacheConfiguration($cacheName) { - $defaultDriver = $this->config->get('doctrine.cache.default', $this->defaultCache['type']); + $defaultDriver = $this->config->get('doctrine.cache.default', $this->defaultCache['type']); $defaultNamespace = $this->config->get('doctrine.cache.namespace', $this->defaultCache['namespace']); - $driverType = $this->config->get('doctrine.cache.'.$cacheName.'.type', $defaultDriver); + $driverType = $this->config->get('doctrine.cache.' . $cacheName . '.type', $defaultDriver); - if ($namespace = $this->config->get('doctrine.cache.'.$cacheName.'.namespace', $defaultNamespace)) { + if ($namespace = $this->config->get('doctrine.cache.' . $cacheName . '.namespace', $defaultNamespace)) { $this->cache->driver($driverType)->setNamespace($namespace); } @@ -362,7 +362,6 @@ protected function setSecondLevelCaching(Configuration $configuration) ) ); } - } /** diff --git a/tests/EntityManagerFactoryTest.php b/tests/EntityManagerFactoryTest.php index 45c8a176..00353baa 100644 --- a/tests/EntityManagerFactoryTest.php +++ b/tests/EntityManagerFactoryTest.php @@ -244,19 +244,18 @@ public function test_custom_cache_namespace_can_be_set() $this->disableSecondLevelCaching(); $this->config->shouldReceive('get') - ->with('doctrine.cache.namespace', null) - ->andReturn('namespace'); + ->with('doctrine.cache.namespace', null) + ->andReturn('namespace'); - foreach($this->caches as $cache) - { + foreach($this->caches as $cache) { $this->config->shouldReceive('get') - ->with('doctrine.cache.'.$cache.'.namespace', 'namespace') + ->with('doctrine.cache.' . $cache . '.namespace', 'namespace') ->once() ->andReturn('namespace'); } - $cache = m::mock(Cache::class); + $this->cache->shouldReceive('driver') ->times($this->cachesCount) ->andReturn($cache); @@ -511,10 +510,9 @@ protected function mockConfig() ->atLeast()->once() ->andReturn('array'); - foreach($this->caches as $cache) - { + foreach($this->caches as $cache) { $this->config->shouldReceive('get') - ->with('doctrine.cache.'.$cache.'.type', 'array') + ->with('doctrine.cache.' . $cache . '.type', 'array') ->atLeast()->once() ->andReturn('array'); } From 617b0a581a0f91fc5d844aed25ce3fe8b2e3ce0c Mon Sep 17 00:00:00 2001 From: Brandon Legault Date: Fri, 20 Jan 2017 10:32:50 -0500 Subject: [PATCH 07/10] Add more formatting for StyleCI --- tests/EntityManagerFactoryTest.php | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/tests/EntityManagerFactoryTest.php b/tests/EntityManagerFactoryTest.php index 00353baa..bafb7198 100644 --- a/tests/EntityManagerFactoryTest.php +++ b/tests/EntityManagerFactoryTest.php @@ -247,7 +247,7 @@ public function test_custom_cache_namespace_can_be_set() ->with('doctrine.cache.namespace', null) ->andReturn('namespace'); - foreach($this->caches as $cache) { + foreach ($this->caches as $cache) { $this->config->shouldReceive('get') ->with('doctrine.cache.' . $cache . '.namespace', 'namespace') ->once() @@ -506,18 +506,17 @@ protected function mockConfig() $this->config = m::mock(Repository::class); $this->config->shouldReceive('get') - ->with('doctrine.cache.default', 'array') - ->atLeast()->once() - ->andReturn('array'); + ->with('doctrine.cache.default', 'array') + ->atLeast()->once() + ->andReturn('array'); - foreach($this->caches as $cache) { + foreach ($this->caches as $cache) { $this->config->shouldReceive('get') ->with('doctrine.cache.' . $cache . '.type', 'array') ->atLeast()->once() ->andReturn('array'); } - $this->config->shouldReceive('has') ->with('database.connections.mysql') ->once() @@ -612,14 +611,12 @@ protected function disableCustomCacheNamespace() ->atLeast()->once() ->andReturn(null); - foreach($this->caches as $cache) - { + foreach ($this->caches as $cache) { $this->config->shouldReceive('get') - ->with('doctrine.cache.'.$cache.'.namespace', null) + ->with('doctrine.cache.' . $cache . '.namespace', null) ->atLeast()->once() ->andReturn(null); } - } protected function disableCustomFunctions() From 2d8e7841de37f51c6c4e48577be24154c9862937 Mon Sep 17 00:00:00 2001 From: Brandon Legault Date: Fri, 20 Jan 2017 10:35:53 -0500 Subject: [PATCH 08/10] Add even more StyleCI fixes --- tests/EntityManagerFactoryTest.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/EntityManagerFactoryTest.php b/tests/EntityManagerFactoryTest.php index bafb7198..bcb0846b 100644 --- a/tests/EntityManagerFactoryTest.php +++ b/tests/EntityManagerFactoryTest.php @@ -128,7 +128,6 @@ protected function setUp() $this->config, $this->listenerResolver ); - } protected function assertEntityManager(EntityManagerInterface $manager) @@ -649,7 +648,6 @@ protected function mockORMConfiguration() $this->configuration->shouldReceive('setQueryCacheImpl')->once(); $this->configuration->shouldReceive('setResultCacheImpl')->once(); - $cache = m::mock(Cache::class); $this->configuration->shouldReceive('getMetadataCacheImpl') ->atLeast()->once() From 74bb4175c80ff7ed84cd3901d8f158bef06edf63 Mon Sep 17 00:00:00 2001 From: Brandon Legault Date: Wed, 25 Jan 2017 14:28:47 -0500 Subject: [PATCH 09/10] Change multicaching to use driver instead of type in the cache array Also added some docblock comments --- config/doctrine.php | 20 ++++++++++++++++---- src/EntityManagerFactory.php | 10 +++++++--- tests/EntityManagerFactoryTest.php | 2 +- 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/config/doctrine.php b/config/doctrine.php index c7de4d59..6cffebad 100644 --- a/config/doctrine.php +++ b/config/doctrine.php @@ -154,10 +154,22 @@ | Available: apc|array|file|memcached|redis|void | */ - 'cache' => [ - 'default' => env('DOCTRINE_CACHE', 'array'), - 'namespace' => null, - 'second_level' => false, + 'cache' => [ + 'second_level' => false, + 'default' => 'array', + 'namespace' => null, + 'metadata' => [ + 'driver' => env('DOCTRINE_METADATA_CACHE', 'array'), + 'namespace' => null, + ], + 'query' => [ + 'driver' => env('DOCTRINE_QUERY_CACHE', 'array'), + 'namespace' => null, + ], + 'result' => [ + 'driver' => env('DOCTRINE_RESULT_CACHE', 'array'), + 'namespace' => null, + ], ], /* |-------------------------------------------------------------------------- diff --git a/src/EntityManagerFactory.php b/src/EntityManagerFactory.php index 583bbfa1..4d57bace 100644 --- a/src/EntityManagerFactory.php +++ b/src/EntityManagerFactory.php @@ -332,18 +332,22 @@ protected function setCacheSettings(Configuration $configuration) $this->setSecondLevelCaching($configuration); } + /** + * @param string $cacheName + * @return mixed + */ private function applyNamedCacheConfiguration($cacheName) { $defaultDriver = $this->config->get('doctrine.cache.default', $this->defaultCache['type']); $defaultNamespace = $this->config->get('doctrine.cache.namespace', $this->defaultCache['namespace']); - $driverType = $this->config->get('doctrine.cache.' . $cacheName . '.type', $defaultDriver); + $driver = $this->config->get('doctrine.cache.' . $cacheName . '.driver', $defaultDriver); if ($namespace = $this->config->get('doctrine.cache.' . $cacheName . '.namespace', $defaultNamespace)) { - $this->cache->driver($driverType)->setNamespace($namespace); + $this->cache->driver($driver)->setNamespace($namespace); } - return $this->cache->driver($driverType); + return $this->cache->driver($driver); } /** diff --git a/tests/EntityManagerFactoryTest.php b/tests/EntityManagerFactoryTest.php index bcb0846b..93b1e5ee 100644 --- a/tests/EntityManagerFactoryTest.php +++ b/tests/EntityManagerFactoryTest.php @@ -511,7 +511,7 @@ protected function mockConfig() foreach ($this->caches as $cache) { $this->config->shouldReceive('get') - ->with('doctrine.cache.' . $cache . '.type', 'array') + ->with('doctrine.cache.' . $cache . '.driver', 'array') ->atLeast()->once() ->andReturn('array'); } From 7cf795bdd80a694cc9639b88c43553f24dce7bf9 Mon Sep 17 00:00:00 2001 From: Brandon Legault Date: Wed, 25 Jan 2017 14:30:51 -0500 Subject: [PATCH 10/10] StyleCI will be the death of me --- config/doctrine.php | 6 +++--- src/EntityManagerFactory.php | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/config/doctrine.php b/config/doctrine.php index 6cffebad..3f5ef7a9 100644 --- a/config/doctrine.php +++ b/config/doctrine.php @@ -155,9 +155,9 @@ | */ 'cache' => [ - 'second_level' => false, - 'default' => 'array', - 'namespace' => null, + 'second_level' => false, + 'default' => 'array', + 'namespace' => null, 'metadata' => [ 'driver' => env('DOCTRINE_METADATA_CACHE', 'array'), 'namespace' => null, diff --git a/src/EntityManagerFactory.php b/src/EntityManagerFactory.php index 4d57bace..3694460b 100644 --- a/src/EntityManagerFactory.php +++ b/src/EntityManagerFactory.php @@ -333,7 +333,7 @@ protected function setCacheSettings(Configuration $configuration) } /** - * @param string $cacheName + * @param string $cacheName * @return mixed */ private function applyNamedCacheConfiguration($cacheName)