title | issue |
---|---|
Disable extensions per env variable |
NEXT-20852 |
- Changed entry files
index.php
andshopware.php
to useComposerPluginLoader
if env variableDISABLE_EXTENSIONS
is set to true. - Added
\Shopware\Core\Framework\App\EmptyActiveAppsLoader
, that will be used if env variableDISABLE_EXTENSIONS
is set to true. - Changed
\Shopware\Core\Framework\Adapter\Twig\EntityTemplateLoader
,\Shopware\Core\Framework\Script\Execution\ScriptExecutor
and\Shopware\Core\Framework\Webhook\WebhookDispatcher
to do an early return if env variableDISABLE_EXTENSIONS
is set to true.
In cluster setups you can't dynamically install or update extensions, because those changes need to be done on every host server. Therfore such operations should be performed during a deployment/rollout and not dynamically.
For this you now can set the variable DISABLE_EXTENSIONS=1
in your .env
file.
This will:
- Only load plugins that are installed over composer, all other plugins are ignored.
- Ignore all apps that may be installed.
Another advantage of that flag is that it reduces the amount of database queries shopware needs to perform on each request, and thus making shopware faster and reducing the load on the database.