From 0f8dd1effb9defb0783de5f24a8c4135086c71a3 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Wed, 7 Aug 2019 16:16:53 +0200 Subject: [PATCH] Added post processing mapping to define the lock store to be used --- module/Core/src/ConfigPostProcessor.php | 1 + module/Core/test/ConfigPostProcessorTest.php | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/module/Core/src/ConfigPostProcessor.php b/module/Core/src/ConfigPostProcessor.php index c9fb9e8f..4a7dc53c 100644 --- a/module/Core/src/ConfigPostProcessor.php +++ b/module/Core/src/ConfigPostProcessor.php @@ -22,6 +22,7 @@ class ConfigPostProcessor 'db_config' => ['entity_manager', 'connection'], 'delete_short_url_threshold' => ['delete_short_urls', 'visits_threshold'], 'locale' => ['translator', 'locale'], + 'lock_store' => ['dependencies', 'aliases', 'lock_store'], ]; private const SIMPLIFIED_CONFIG_TOGGLES = [ 'not_found_redirect_to' => ['url_shortener', 'not_found_short_url', 'enable_redirection'], diff --git a/module/Core/test/ConfigPostProcessorTest.php b/module/Core/test/ConfigPostProcessorTest.php index 2a676807..642ccdfc 100644 --- a/module/Core/test/ConfigPostProcessorTest.php +++ b/module/Core/test/ConfigPostProcessorTest.php @@ -41,6 +41,7 @@ class ConfigPostProcessorTest extends TestCase 'delete_short_url_threshold' => 50, 'locale' => 'es', 'not_found_redirect_to' => 'foobar.com', + 'lock_store' => 'redis_lock_store', 'db_config' => [ 'dbname' => 'shlink', 'user' => 'foo', @@ -84,6 +85,12 @@ class ConfigPostProcessorTest extends TestCase 'visits_threshold' => 50, 'check_visits_threshold' => true, ], + + 'dependencies' => [ + 'aliases' => [ + 'lock_store' => 'redis_lock_store', + ], + ], ]; $result = ($this->postProcessor)(array_merge($config, $simplified));