From b7641cd68258e8e89b4330e2dffb80dd4b1f3773 Mon Sep 17 00:00:00 2001 From: nook24 Date: Tue, 12 Dec 2023 11:32:51 +0100 Subject: [PATCH] Revert change 85b43eaf6e6820ccf9dd1c347e4d4b59790c6e35 as it brings unexpected behavior if Plugins/Modules contain old versions of CakePHP https://github.com/it-novum/openITCOCKPIT/pull/1578 --- src/Lib/PluginManager.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/Lib/PluginManager.php b/src/Lib/PluginManager.php index 6f974d447a..1e0d356ede 100644 --- a/src/Lib/PluginManager.php +++ b/src/Lib/PluginManager.php @@ -89,9 +89,12 @@ private function addAllPlugins() { ); $this->application->addPlugin($moduleName); - if (is_file(PLUGIN . $moduleName . DS . 'vendor/autoload.php')) { - require PLUGIN . $moduleName . DS . 'vendor/autoload.php'; - } + // https://github.com/it-novum/openITCOCKPIT/pull/1578 + // This leads to issues when Plugins/Modules have older version of CakePHP (to run Tests for example) + // Issues like 'Unknown method "selectQuery" called on App\\Model\\Table\\AgentchecksTable' + //if (is_file(PLUGIN . $moduleName . DS . 'vendor/autoload.php')) { + // require PLUGIN . $moduleName . DS . 'vendor/autoload.php'; + //} $pluginAssociationsFile = PLUGIN . $moduleName . DS . 'config' . DS . 'associations.php'; if (file_exists($pluginAssociationsFile)) {