for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace AppBundle\Command;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
/**
* Class DefaultCommand.
*/
class DefaultCommand extends ContainerAwareCommand
{
* @var \Symfony\Component\Console\Style\SymfonyStyle
protected $style;
* {@inheritdoc}
*
* @see \Symfony\Component\Console\Command\Command::configure()
protected function configure()
$this->setName('app:default:show')
->setDescription(
'execute command to display message'
)
->setHelp(
<<<'EOT'
execute command app:default:index to display welcome message
EOT
);
}
* @see \Symfony\Component\Console\Command\Command::initialize()
protected function initialize(InputInterface $input, OutputInterface $output)
$this->style = new SymfonyStyle($input, $output);
$this->style->title('AppBundle:Default:Show Command');
* @see \Symfony\Component\Console\Command\Command::execute()
protected function execute(InputInterface $input, OutputInterface $output)
$this->style->write(
'Hello Micro Framework from command'
$this->style->newLine(1);