mirror of
https://github.com/opdavies/gmail-filter-builder.git
synced 2025-03-13 05:26:57 +00:00
Set default command
This commit is contained in:
parent
fc629ead56
commit
99caed2737
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
|
||||
use Opdavies\GmailFilterBuilder\Console\Command\GenerateCommand;
|
||||
use Opdavies\GmailFilterBuilder\Container\Container;
|
||||
use Symfony\Component\Console\Application;
|
||||
|
||||
|
@ -9,4 +10,5 @@ $container = new Container();
|
|||
|
||||
/** @var Application $application */
|
||||
$application = $container->get('app.cli');
|
||||
$application->setDefaultCommand(GenerateCommand::NAME);
|
||||
$application->run();
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue