Fix persistence problem with plugin registration.

- Move the PluginManager creation to a service.
- Move plugin discovery to creation.
- Create static discovery and namespaces variables in the PluginManager.php library
- Refactor persistent namespace declarations
- Refactor redundant code to private function.
- Remove whitespace
- Remove enable setting from MailchimpPlugin. That is handled by the PluginManager.php
- Update Events.php to call the pluginManager service
- Correct typo in enabled setting for BasePlugin to accurately reflect the database naming.

Signed-off-by: objec <objecttothis@gmail.com>
This commit is contained in:
objec committed 2026-04-29 10:31:04 +04:00
1 parent 1a9e84bd37
commit 32997d48c0
7 files changed
+58 -29

No files matched your search

+1 -2
View File
@@ -12,8 +12,7 @@ class Plugins extends Secure_Controller
public function __construct()
{
parent::__construct('plugins');
$this->pluginManager = new PluginManager();
$this->pluginManager->discoverPlugins();
$this->pluginManager = service('pluginManager');
}
public function getIndex(): string