[Command] make command more consistent, add info to docs

This commit is contained in:
SirDomin 2021-12-09 10:19:06 +01:00
parent f8348e9859
commit 33a3d4e994
No known key found for this signature in database
GPG key ID: D74943926397267A
3 changed files with 6 additions and 4 deletions

View file

@ -44,6 +44,7 @@ Run the Sylius installation command to do that.
This command will do several things for you - the first two steps are checking if your environment fulfills technical requirements,
and setting the project database. You will also be asked if you want to have default fixtures loaded into your database - let's say
"No" to that, we will configure the store manually.
You will be also asked if you want to generate API Tokens.
.. image:: /_images/getting-started-with-sylius/installation1.png

View file

@ -37,8 +37,8 @@ final class InstallCommand extends AbstractInstallCommand
'message' => 'Shop configuration.',
],
[
'command' => 'jwt_setup',
'message' => 'JWT configuration.',
'command' => 'jwt-setup',
'message' => 'Configuring JWT token.',
],
[
'command' => 'assets',

View file

@ -19,7 +19,7 @@ use Symfony\Component\Console\Question\ConfirmationQuestion;
final class JwtConfigurationCommand extends AbstractInstallCommand
{
protected static $defaultName = 'sylius:install:jwt_setup';
protected static $defaultName = 'sylius:install:jwt-setup';
protected function configure(): void
{
@ -37,7 +37,7 @@ EOT
{
$helper = $this->getHelper('question');
$output->writeln('Configuring API');
$output->writeln('Generating JWT token for Sylius API');
$question = new ConfirmationQuestion('Do you want to generate JWT token? (y/N)', false);
@ -48,6 +48,7 @@ EOT
$this->commandExecutor->runCommand('lexik:jwt:generate-keypair', ['--overwrite' => true], $output);
$output->writeln('Please, remember to enable Sylius API');
$output->writeln('https://docs.sylius.com/en/1.10/book/api/introduction.html');
return 0;
}