From a2f67e7bb64e9a894f6fe28ddafd4cb58b772b29 Mon Sep 17 00:00:00 2001 From: Artem Vasilev Date: Sat, 16 Mar 2024 23:04:42 +0300 Subject: [PATCH] prepend autoloader in composer.json config --- .../administrator/src/Helper/ComponentHelper.php | 8 ++------ composer.json | 3 ++- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/com_oauthserver/administrator/src/Helper/ComponentHelper.php b/com_oauthserver/administrator/src/Helper/ComponentHelper.php index 43ae6c5..4e534db 100644 --- a/com_oauthserver/administrator/src/Helper/ComponentHelper.php +++ b/com_oauthserver/administrator/src/Helper/ComponentHelper.php @@ -25,12 +25,8 @@ abstract class ComponentHelper if (!isset($registered)) { - /** @var \Composer\Autoload\ClassLoader $loader */ - $loader = require JPATH_ADMINISTRATOR . '/components/com_oauthserver/vendor/autoload.php'; - - $loader->unregister(); - - $loader->register(); + require JPATH_ADMINISTRATOR . '/components/com_oauthserver/vendor/autoload.php'; + $registered = true; } } } diff --git a/composer.json b/composer.json index 4e02075..b2bd6d9 100644 --- a/composer.json +++ b/composer.json @@ -29,6 +29,7 @@ "vendor-dir": "com_oauthserver/administrator/vendor", "github-protocols": [ "https" - ] + ], + "prepend-autoloader": false } }