From 8176afb073e05ca0ba2e290543f109177fde6dbc Mon Sep 17 00:00:00 2001 From: xboard <147830212+cedar2025@users.noreply.github.com> Date: Tue, 23 Sep 2025 14:59:22 +0800 Subject: [PATCH] fix(plugin): remove stale plugin records when files missing; adjust logging --- app/Services/Plugin/PluginManager.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Services/Plugin/PluginManager.php b/app/Services/Plugin/PluginManager.php index 3efe640..5c3b351 100644 --- a/app/Services/Plugin/PluginManager.php +++ b/app/Services/Plugin/PluginManager.php @@ -53,7 +53,8 @@ class PluginManager if (!class_exists($pluginClass)) { $pluginFile = $this->getPluginPath($pluginCode) . '/Plugin.php'; if (!File::exists($pluginFile)) { - Log::error("Plugin class file not found: {$pluginFile}"); + Log::warning("Plugin class file not found: {$pluginFile}"); + Plugin::query()->where('code', $pluginCode)->delete(); return null; } require_once $pluginFile;