I am creating new custom command in Symfony framework under Mautic platform. Am getting below error.
an option named "connection" already exists
I addOption
is not available in my command.php file.
This code from command.php under Command folder.
class PluginCommand extends ContainerAwareCommand
{
protected function configure()
{
$this
->setName('customplugin:create')
->setDescription('Create a custom plugin')
->addArgument(
'bundlename',
InputArgument::OPTIONAL,
'Enter Bundle Name (Give name is camelcase do not include Bundle word): '
)
->addArgument(
'author',
InputArgument::OPTIONAL,
'Enter Author Name for plugin:'
)
;
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$bundle_name = $input->getArgument('bundlename');
$author = $input->getArgument('author');
$output->writeln($author);
}
}
source https://stackoverflow.com/questions/67862795/an-option-named-connection-already-exists-while-creating-new-custom-command-in
No comments:
Post a Comment