Console commands are now lazy loaded

This commit is contained in:
Alejandro Celaya
2017-12-27 15:37:26 +01:00
parent a9094dc0f6
commit af0ff0f65b
19 changed files with 78 additions and 45 deletions

View File

@@ -11,6 +11,8 @@ use Zend\I18n\Translator\TranslatorInterface;
class GenerateCharsetCommand extends Command
{
const NAME = 'config:generate-charset';
/**
* @var TranslatorInterface
*/
@@ -24,7 +26,7 @@ class GenerateCharsetCommand extends Command
public function configure()
{
$this->setName('config:generate-charset')
$this->setName(self::NAME)
->setDescription(sprintf($this->translator->translate(
'Generates a character set sample just by shuffling the default one, "%s". '
. 'Then it can be set in the SHORTCODE_CHARS environment variable'

View File

@@ -13,6 +13,8 @@ class GenerateSecretCommand extends Command
{
use StringUtilsTrait;
const NAME = 'config:generate-secret';
/**
* @var TranslatorInterface
*/
@@ -26,7 +28,7 @@ class GenerateSecretCommand extends Command
public function configure()
{
$this->setName('config:generate-secret')
$this->setName(self::NAME)
->setDescription($this->translator->translate(
'Generates a random secret string that can be used for JWT token encryption'
));