$update =
$this->apiClient->
checkForUpdates();
return new JsonResponse($this->extensionCompatibility->
getExtensionCompatibilities($update,
$context));
} #[Route(path: '/api/_action/update/download-recovery', name: 'api.custom.updateapi.download-recovery', defaults: ['_acl' => ['system:core:update', 'system_config:read']], methods: ['GET'])]
public function downloadLatestRecovery(): Response
{ $this->apiClient->
downloadRecoveryTool();
return new NoContentResponse();
} #[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