From f54a71e26964a777c26b932bcee99415f0431a35 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 4 Oct 2026 20:18:36 +0000 Subject: [PATCH 1/4] Initial plan From 80a4f880baeaf1fe130bbc41aa417185afec9895 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 4 Oct 2026 20:19:34 +0000 Subject: [PATCH 2/4] Apply remaining changes Co-authored-by: bfoujols <7000210+bfoujols@users.noreply.github.com> --- src/EduFramework/Commands/CreateApiCommand.php | 2 +- src/EduFramework/Commands/CreateCliCommand.php | 2 +- src/EduFramework/Commands/CreateControllerCommand.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/EduFramework/Commands/CreateApiCommand.php b/src/EduFramework/Commands/CreateApiCommand.php index 0e2ebe4..488ed62 100644 --- a/src/EduFramework/Commands/CreateApiCommand.php +++ b/src/EduFramework/Commands/CreateApiCommand.php @@ -46,7 +46,7 @@ class CreateApiCommand extends Command protected function configure(): void { - $this->AddArgument('controller-name', InputArgument::REQUIRED, 'Controller name'); + $this->addArgument('controller-name', InputArgument::REQUIRED, 'Controller name'); } /** diff --git a/src/EduFramework/Commands/CreateCliCommand.php b/src/EduFramework/Commands/CreateCliCommand.php index c411904..9567b5d 100644 --- a/src/EduFramework/Commands/CreateCliCommand.php +++ b/src/EduFramework/Commands/CreateCliCommand.php @@ -44,7 +44,7 @@ class CreateCliCommand extends Command protected function configure(): void { - $this->AddArgument('command-name', InputArgument::REQUIRED, 'Commande name'); + $this->addArgument('command-name', InputArgument::REQUIRED, 'Commande name'); } /** diff --git a/src/EduFramework/Commands/CreateControllerCommand.php b/src/EduFramework/Commands/CreateControllerCommand.php index d2e5799..3d57a73 100644 --- a/src/EduFramework/Commands/CreateControllerCommand.php +++ b/src/EduFramework/Commands/CreateControllerCommand.php @@ -47,7 +47,7 @@ class CreateControllerCommand extends Command protected function configure(): void { - $this->AddArgument('controller-name', InputArgument::REQUIRED, 'Controller name'); + $this->addArgument('controller-name', InputArgument::REQUIRED, 'Controller name'); } /** @@ -63,7 +63,7 @@ public function execute(InputInterface $input, OutputInterface $output): int $io = new SymfonyStyle($input, $output); //Format controller-name arg - $namesCollection = self::getNamesCollection($input->getArgument('controller-name')); + $namesCollection = $this->getNamesCollection($input->getArgument('controller-name')); //Generate route params in app/Config/routes.yaml $this->generateRoute($namesCollection["uri"], $namesCollection["uri"], $namesCollection["className"]); //Generate Controller Class From 30f7f12c0421de63619cc2d422e66984ec7a3fb7 Mon Sep 17 00:00:00 2001 From: bfoujols Date: Mon, 5 Oct 2026 10:16:52 +0200 Subject: [PATCH 3/4] fix: update .gitignore and initialize handler property in Request class --- .gitignore | 5 ++++- src/EduFramework/Commands/StartCommand.php | 5 ++--- src/EduFramework/Core/Controller/Request.php | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 643e95a..9d97d38 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,7 @@ composer.phar .php-cs-fixer.cache .php-cs-fixer.php .phpunit.result.cache +.codacy/logs/ # Environment .env @@ -19,4 +20,6 @@ clover.xml # Documentation venv/** -.cache/** \ No newline at end of file +.cache/** +site/** +.DS_Store diff --git a/src/EduFramework/Commands/StartCommand.php b/src/EduFramework/Commands/StartCommand.php index dc2e591..0e0e36f 100644 --- a/src/EduFramework/Commands/StartCommand.php +++ b/src/EduFramework/Commands/StartCommand.php @@ -80,13 +80,12 @@ protected function execute(InputInterface $input, ConsoleOutputInterface|OutputI $noCheck = $input->getOption('no-start'); if ($noCheck === false) { - $animationSlash = $output->section(); for ($slash = 0; $slash <= 5; $slash++) { - $animationSlash->writeln([ + $output->writeln([ CommandBanner::getBanner($slash) ]); usleep(500000); // (0.5 seconde) - $slash < 5 ? $animationSlash->clear() : ""; + // Note : clear() n'est pas disponible sans section(), donc on ne l'utilise pas ici } } diff --git a/src/EduFramework/Core/Controller/Request.php b/src/EduFramework/Core/Controller/Request.php index 85e40ac..6a6d095 100644 --- a/src/EduFramework/Core/Controller/Request.php +++ b/src/EduFramework/Core/Controller/Request.php @@ -36,7 +36,7 @@ class Request * Nom de la classe du controller * @var string $hander */ - private string $hander; + private string $hander = ''; /** * Les variables de la requête HTTP From 28b5662e59a49e813f4ae4d7c045d7c43df593f7 Mon Sep 17 00:00:00 2001 From: bfoujols Date: Mon, 5 Oct 2026 10:25:26 +0200 Subject: [PATCH 4/4] =?UTF-8?q?fix:=20ajuster=20l'affichage=20de=20la=20ba?= =?UTF-8?q?nni=C3=A8re=20dans=20la=20commande=20StartCommand?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/EduFramework/Commands/StartCommand.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/EduFramework/Commands/StartCommand.php b/src/EduFramework/Commands/StartCommand.php index 0e0e36f..c727ede 100644 --- a/src/EduFramework/Commands/StartCommand.php +++ b/src/EduFramework/Commands/StartCommand.php @@ -80,12 +80,19 @@ protected function execute(InputInterface $input, ConsoleOutputInterface|OutputI $noCheck = $input->getOption('no-start'); if ($noCheck === false) { + // Calcule le nombre de lignes de la bannière (ajuste si nécessaire) + $bannerLines = count(explode("\n", CommandBanner::getBanner(0))); for ($slash = 0; $slash <= 5; $slash++) { + if ($slash > 0) { + // Efface uniquement les lignes de la bannière précédente + for ($i = 0; $i < $bannerLines; $i++) { + $output->write("\033[1A\033[2K"); // Remonte d'une ligne et efface + } + } $output->writeln([ CommandBanner::getBanner($slash) ]); usleep(500000); // (0.5 seconde) - // Note : clear() n'est pas disponible sans section(), donc on ne l'utilise pas ici } }