namespace App\Command; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; class CommandeTest extends Command { // Nom de la commande protected static $defaultName = 'app:test'; protected function configure() { $this->addArgument('username', InputArgument::REQUIRED, 'The username of the user.'); // ... } public function execute( InputInterface $input, OutputInterface $output ) { $username = $input->getArgument('username'); // ... $output->writeln("Nom d'utilisateur : " . $username); return 0; } }