diff --git a/bin/generate-filters.php b/bin/generate-filters.php index bcb8964..00f7171 100644 --- a/bin/generate-filters.php +++ b/bin/generate-filters.php @@ -1,5 +1,6 @@ get('app.cli'); +$application->setDefaultCommand(GenerateCommand::NAME); $application->run(); diff --git a/config/services.yml b/config/services.yml index 234a02f..afd00b9 100644 --- a/config/services.yml +++ b/config/services.yml @@ -3,7 +3,7 @@ services: class: Symfony\Component\Console\Application autowire: true - app.generator.command: + app.generate.command: class: Opdavies\GmailFilterBuilder\Console\Command\GenerateCommand autowire: true tags: diff --git a/src/Console/Command/GenerateCommand.php b/src/Console/Command/GenerateCommand.php index 194ace6..70dea4e 100644 --- a/src/Console/Command/GenerateCommand.php +++ b/src/Console/Command/GenerateCommand.php @@ -10,13 +10,15 @@ use Symfony\Component\Console\Output\OutputInterface; class GenerateCommand extends Command { + const NAME = 'generate'; + /** * {@inheritdoc} */ public function configure() { $this - ->setName('generate') + ->setName(self::NAME) ->setDefinition([ new InputArgument('input-file', InputArgument::OPTIONAL, 'The name of the PHP file containing your filters.', 'filters.php'), new InputArgument('output-file', InputArgument::OPTIONAL, 'The name of the XML file to generate.', 'filters.xml')