translator = $translator; parent::__construct(null); } public function configure() { $this->setName('config:generate-secret') ->setDescription($this->translator->translate( 'Generates a random secret string that can be used for JWT token encryption' )); } public function execute(InputInterface $input, OutputInterface $output) { $secret = $this->generateRandomString(32); $output->writeln($this->translator->translate('Secret key:') . sprintf(' %s', $secret)); } }