TestCommand.php 717 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. use Symfony\Component\Console\Command\Command;
  3. use Symfony\Component\Console\Input\InputInterface;
  4. use Symfony\Component\Console\Output\OutputInterface;
  5. class TestCommand extends Command
  6. {
  7. protected function configure()
  8. {
  9. $this
  10. ->setName('namespace:name')
  11. ->setAliases(['name'])
  12. ->setDescription('description')
  13. ->setHelp('help')
  14. ;
  15. }
  16. protected function execute(InputInterface $input, OutputInterface $output): int
  17. {
  18. $output->writeln('execute called');
  19. return 0;
  20. }
  21. protected function interact(InputInterface $input, OutputInterface $output)
  22. {
  23. $output->writeln('interact called');
  24. }
  25. }