Added post processing mapping to define the lock store to be used

This commit is contained in:
Alejandro Celaya 2019-08-07 16:16:53 +02:00
parent 2c4a8543db
commit 0f8dd1effb
2 changed files with 8 additions and 0 deletions

View file

@ -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'],

View file

@ -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));