Skip to content

Commit

Permalink
feat: support class PluginServiceProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
jevantang committed Mar 27, 2024
1 parent b5d593d commit d579b13
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,9 @@ public function isAvailablePlugin(?string $pluginFskey = null)
$plugin->manualAddNamespace();

$serviceProvider = sprintf('%s\\Providers\\%sServiceProvider', $plugin->getClassNamespace(), $pluginFskey);
$pluginServiceProvider = sprintf('%s\\Providers\\PluginServiceProvider', $plugin->getClassNamespace(), $pluginFskey);;

return class_exists($serviceProvider);
return class_exists($serviceProvider) || class_exists($pluginServiceProvider);
} catch (\Throwable $e) {
\info("{$pluginFskey} registration failed, not a valid plugin: ".$e->getMessage());

Expand Down

0 comments on commit d579b13

Please sign in to comment.