From 2fa3cc4433e398cb5711ce7f8286368cd823f546 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=2E=20Nagy=20Gerg=C5=91?= Date: Wed, 25 Sep 2024 15:11:21 +0200 Subject: [PATCH 1/2] [11.x] Fix make:listener command --- src/Illuminate/Foundation/Console/ListenerMakeCommand.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Illuminate/Foundation/Console/ListenerMakeCommand.php b/src/Illuminate/Foundation/Console/ListenerMakeCommand.php index 31bef173ac13..e664adb8d975 100644 --- a/src/Illuminate/Foundation/Console/ListenerMakeCommand.php +++ b/src/Illuminate/Foundation/Console/ListenerMakeCommand.php @@ -2,15 +2,15 @@ namespace Illuminate\Foundation\Console; +use function Laravel\Prompts\suggest; use Illuminate\Console\Concerns\CreatesMatchingTest; use Illuminate\Console\GeneratorCommand; use Illuminate\Support\Str; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Output\OutputInterface; -use function Laravel\Prompts\suggest; +use Symfony\Component\Console\Output\OutputInterface; #[AsCommand(name: 'make:listener')] class ListenerMakeCommand extends GeneratorCommand @@ -104,7 +104,7 @@ protected function getStub() */ protected function alreadyExists($rawName) { - return class_exists($rawName); + return class_exists($this->qualifyClass($rawName)); } /** From a18fb149168c3731c603fbe26c7de2e9fbd41668 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=2E=20Nagy=20Gerg=C5=91?= Date: Wed, 25 Sep 2024 15:17:36 +0200 Subject: [PATCH 2/2] Update ListenerMakeCommand.php --- src/Illuminate/Foundation/Console/ListenerMakeCommand.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Illuminate/Foundation/Console/ListenerMakeCommand.php b/src/Illuminate/Foundation/Console/ListenerMakeCommand.php index e664adb8d975..d5589ece59a9 100644 --- a/src/Illuminate/Foundation/Console/ListenerMakeCommand.php +++ b/src/Illuminate/Foundation/Console/ListenerMakeCommand.php @@ -2,16 +2,16 @@ namespace Illuminate\Foundation\Console; -use function Laravel\Prompts\suggest; use Illuminate\Console\Concerns\CreatesMatchingTest; use Illuminate\Console\GeneratorCommand; use Illuminate\Support\Str; use Symfony\Component\Console\Attribute\AsCommand; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputOption; - use Symfony\Component\Console\Output\OutputInterface; +use function Laravel\Prompts\suggest; + #[AsCommand(name: 'make:listener')] class ListenerMakeCommand extends GeneratorCommand {