From 4634603ec54270ecf2b974bb465246d9410fffc4 Mon Sep 17 00:00:00 2001 From: Girish Ramakrishnan Date: Fri, 18 Oct 2024 17:26:14 +0200 Subject: [PATCH] cli: fix crash when running commands The commands are cached in cache store and not in session object. Fixes #2710 --- app/Core/Console/ConsoleKernel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Core/Console/ConsoleKernel.php b/app/Core/Console/ConsoleKernel.php index f70e6639d2..227517ba44 100644 --- a/app/Core/Console/ConsoleKernel.php +++ b/app/Core/Console/ConsoleKernel.php @@ -151,7 +151,7 @@ protected function commands() array_map(fn ($plugin) => $plugin->foldername, $this->getApplication()->make(PluginsService::class)->getAllPlugins(enabledOnly: true)), ))); - $commands = collect(Arr::flatten(session("commands"))) + $commands = collect(Arr::flatten(Cache::store('installation')->many(["commands.core", "commands.plugins"]))) ->map(fn ($path) => $this->getApplication()->getNamespace() . Str::of($path)->remove([APP_ROOT . '/app/', APP_ROOT . '/custom/'])->replace(['/', '.php'], ['\\', ''])->toString()); /**