Ensured required config options cannot be left empty

This commit is contained in:
Alejandro Celaya
2018-09-30 09:40:43 +02:00
parent 48f01921e1
commit 8323b87076
8 changed files with 83 additions and 22 deletions

View File

@@ -19,20 +19,14 @@ class ApplicationConfigCustomizer implements ConfigCustomizerInterface
return;
}
$validator = function ($value) {
return $value;
};
$appConfig->setApp([
'SECRET' => $io->ask(
'Define a secret string that will be used to sign API tokens (leave empty to autogenerate one)',
null,
$validator
'Define a secret string that will be used to sign API tokens (leave empty to autogenerate one) '
. '<fg=red>[DEPRECATED. TO BE REMOVED]</>'
) ?: $this->generateRandomString(32),
'DISABLE_TRACK_PARAM' => $io->ask(
'Provide a parameter name that you will be able to use to disable tracking on specific request to '
. 'short URLs (leave empty and this feature won\'t be enabled)',
null,
$validator
. 'short URLs (leave empty and this feature won\'t be enabled)'
),
]);
}