#[Route(path: '/api/_action/update/deactivate-plugins', name: 'api.custom.updateapi.deactivate-plugins', defaults: ['_acl' => ['system:core:update', 'system_config:read']], methods: ['GET'])]
public function deactivatePlugins(Request
$request, Context
$context): JsonResponse
{ $update =
$this->apiClient->
checkForUpdates();
$offset =
$request->query->
getInt('offset'
);
if ($offset === 0
) { // plugins can subscribe to these events, check compatibility and throw exceptions to prevent the update
$this->eventDispatcher->
dispatch( new UpdatePrePrepareEvent($context,
$this->shopwareVersion,
$update->version
) );
} // disable plugins - save active plugins
$deactivationFilter =
(string) $request->query->
get( 'deactivationFilter',
ExtensionCompatibility::PLUGIN_DEACTIVATION_FILTER_NOT_COMPATIBLE
);
$deactivatePluginStep =
new DeactivateExtensionsStep( $update,