Commit 6fbed43f authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Amélioration du templace command

parent 65426743
Loading
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -2,19 +2,22 @@

namespace <namespace>;

use Symfony\Component\Console\Command\Command as SymfonyCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;

/**
 * Description of <classname>
 *
 * @author <author>
 */
class <classname> extends SymfonyCommand
class <classname> extends Command
{
    protected function execute(InputInterface $input, OutputInterface $output): int
    {
        $io = new SymfonyStyle($input, $output);

        // ... put here the code to create the user

        // this method must return an integer number with the "exit status code"
@@ -22,7 +25,7 @@ class <classname> extends SymfonyCommand

        // return this if there was no problem running the command
        // (it's equivalent to returning int(0))
        return SymfonyCommand::SUCCESS;
        return Command::SUCCESS;

        // or return this if some error happened during the execution
        // (it's equivalent to returning int(1))