Command::SUCCESS

Description

SUCCESS constant to be used as command exit code

Syntax

// src/Command/CreateUserCommand.php
namespace App\Command;

use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

class CreateUserCommand extends Command
{
protected static $defaultName = ‘app:create-user’;

// ...

protected function execute(InputInterface $input, OutputInterface $output)
{
    // ...

    // Before
    return 0;

    // After
    return Command::SUCCESS;
}

}