connection = $connection; } protected function configure() { $this ->setDescription('Populate the database.'); } protected function execute(InputInterface $input, OutputInterface $output): int { try { // On supprime la table si elle existe dรฉjร  $this->connection->executeStatement('DROP TABLE IF EXISTS stock_emoji'); // On crรฉe la table $this->connection->executeStatement(' CREATE TABLE stock_emoji ( id INT PRIMARY KEY, code VARCHAR(255) NOT NULL ) '); // On peuple la table $this->connection->executeStatement("INSERT INTO stock_emoji (id, code) VALUES (1,'๐Ÿค–'), (2,'๐Ÿ˜บ'), (3,'๐Ÿง '), (4,'๐Ÿ‘ป'), (5,'๐ŸงŸ'), (6,'๐Ÿถ'), (7,'๐Ÿ‘ฝ'), (8,'๐Ÿง›'), (9,'๐ŸŽƒ'), (10,'๐Ÿธ'), (11,'โšก'), (12,'๐Ÿ’€'), (13,'๐Ÿ”ฅ'), (14,'๐Ÿง™'), (15,'๐ŸŒช๏ธ'), (16,'๐Ÿ˜Ž'), (17,'๐Ÿ˜'), (18,'๐ŸŒŸ'), (19,'๐Ÿ˜ˆ') "); $output->writeln('Base de donnรฉes peuplรฉe.'); } catch (\Exception $e) { $output->writeln('Erreur : ' . $e->getMessage() . ''); return Command::FAILURE; } return Command::SUCCESS; } }