fix(Command): rename it to prevent errors with default name `command`

master
dufraissejeremy 2 years ago
parent 817ba4501d
commit eb547ef962
  1. 20
      src/commands/SeacmsTest.php
  2. 2
      src/installer/Plugin.php

@ -15,8 +15,22 @@ use Symfony\Component\Console\Output\OutputInterface;
* Command to lauch tests from command line accross all seacms dependencies
*/
class Command extends BaseCommand
class SeacmsTest extends BaseCommand
{
/**
* @var string|null The default command name
*/
protected static $defaultName = 'seacms-test';
/**
* overwrite default __construct to be abel to receive array
* @param array|string|null $args
*/
public function __construct(string $name = null)
{
$name = is_string($args) ? $args : null;
parent::__construct($name);
}
/**
* set name
@ -30,8 +44,8 @@ use Symfony\Component\Console\Output\OutputInterface;
// the full command description shown when running the command with
// the "--help" option
->setHelp("Test seacms via command line.\n".
"(Only if phpunit available)\n")
// ->setHelp("Test seacms via command line.\n".
// "(Only if phpunit available)\n")
->addOption('toto', '', InputOption::VALUE_NONE, 'Display toto text')
->addOption('text', 't', InputOption::VALUE_REQUIRED, 'Display the text')

@ -233,7 +233,7 @@ class Plugin extends ParentPlugin
public function getCapabilities()
{
return [
'Composer\Plugin\Capability\CommandProvider' => 'Seacms\\Command\\Command',
'Composer\Plugin\Capability\CommandProvider' => 'Seacms\\Command\\SeacmsTest',
];
}
/* === implements EventsSubscriberInterface === */

Loading…
Cancel
Save