mirror of
https://github.com/shlinkio/shlink.git
synced 2025-03-14 04:00:57 +03:00
Added post processing mapping to define the lock store to be used
This commit is contained in:
parent
2c4a8543db
commit
0f8dd1effb
2 changed files with 8 additions and 0 deletions
|
@ -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'],
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Add table
Reference in a new issue