From af52339ac47544ddf5416c03e97d41ca1d21f69a Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Fri, 30 May 2025 08:54:08 +0800 Subject: [PATCH 1/2] [11.x] Fixes Symfony Console 7.3 deprecations on closure command fixes #55887 Signed-off-by: Mior Muhammad Zaki --- src/Illuminate/Foundation/Console/ClosureCommand.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Illuminate/Foundation/Console/ClosureCommand.php b/src/Illuminate/Foundation/Console/ClosureCommand.php index 2c2eaf4d2744..e3c3d811e041 100644 --- a/src/Illuminate/Foundation/Console/ClosureCommand.php +++ b/src/Illuminate/Foundation/Console/ClosureCommand.php @@ -25,6 +25,13 @@ class ClosureCommand extends Command */ protected $callback; + /** + * The console command description. + * + * @var string + */ + protected $description = ''; + /** * Create a new command instance. * From 9573dee2bc0e216c8c9692166a47419541e73ae1 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Fri, 30 May 2025 09:42:04 +0800 Subject: [PATCH 2/2] wip Signed-off-by: Mior Muhammad Zaki --- .../Foundation/Console/ClosureCommandTest.php | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/Integration/Foundation/Console/ClosureCommandTest.php diff --git a/tests/Integration/Foundation/Console/ClosureCommandTest.php b/tests/Integration/Foundation/Console/ClosureCommandTest.php new file mode 100644 index 000000000000..c57243193b63 --- /dev/null +++ b/tests/Integration/Foundation/Console/ClosureCommandTest.php @@ -0,0 +1,23 @@ +comment('We must ship. - Taylor Otwell'); + })->purpose('Display an inspiring quote'); + } + + public function testItCanRunClosureCommand() + { + $this->artisan('inspire')->expectsOutput('We must ship. - Taylor Otwell'); + } +}