From: Christoph Wurst Date: Thu, 12 Jan 2023 10:49:28 +0000 (+0100) Subject: perf(autoloader): Drop legacy class autoloader X-Git-Tag: v27.0.0beta1~319^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F36114%2Fhead;p=nextcloud-server.git perf(autoloader): Drop legacy class autoloader The documentation says apps should use PSR-4 to get their classes loaded. The legacy PSR-0 is still in place and has a negative impact on performance. Signed-off-by: Christoph Wurst --- diff --git a/lib/private/legacy/OC_App.php b/lib/private/legacy/OC_App.php index a7887d2bed7..3c255e91661 100644 --- a/lib/private/legacy/OC_App.php +++ b/lib/private/legacy/OC_App.php @@ -298,8 +298,6 @@ class OC_App { require_once $path . '/composer/autoload.php'; } else { \OC::$composerAutoloader->addPsr4($appNamespace . '\\', $path . '/lib/', true); - // Register on legacy autoloader - \OC::$loader->addValidRoot($path); } // Register Test namespace only when testing