Skip to content

Commit

Permalink
Revert change 85b43ea as it brings unexpected behavior if Plugins/Mod…
Browse files Browse the repository at this point in the history
…ules contain old versions of CakePHP

#1578
  • Loading branch information
nook24 committed Dec 12, 2023
1 parent 1550a4b commit b7641cd
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/Lib/PluginManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit b7641cd

Please sign in to comment.