From ea14b3eddee5a9553ba04caf7faf804d2e9b644e Mon Sep 17 00:00:00 2001 From: Jonas Elfering Date: Wed, 30 Mar 2022 16:12:53 +0200 Subject: [PATCH] NEXT-20852 - Add support for DISABLE_EXTENSIONS env var --- bin/console | 5 +++++ public/index.php | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/bin/console b/bin/console index f7f9b38..8e72ddc 100755 --- a/bin/console +++ b/bin/console @@ -40,5 +40,10 @@ if ($debug) { } $kernel = new HttpKernel($env, $debug, $classLoader); + +if ($_SERVER['COMPOSER_PLUGIN_LOADER'] ?? $_SERVER['DISABLE_EXTENSIONS'] ?? false) { + $kernel->setPluginLoader(new \Shopware\Core\Framework\Plugin\KernelPluginLoader\ComposerPluginLoader($classLoader)); +} + $application = new Application($kernel->getKernel()); $application->run($input); diff --git a/public/index.php b/public/index.php index cf0144d..0317287 100644 --- a/public/index.php +++ b/public/index.php @@ -45,6 +45,11 @@ $request = Request::createFromGlobals(); $kernel = new HttpKernel($appEnv, $debug, $classLoader); + +if ($_SERVER['COMPOSER_PLUGIN_LOADER'] ?? $_SERVER['DISABLE_EXTENSIONS'] ?? false) { + $kernel->setPluginLoader(new \Shopware\Core\Framework\Plugin\KernelPluginLoader\ComposerPluginLoader($classLoader)); +} + $result = $kernel->handle($request); $result->getResponse()->send();