fetchActiveExtensions example

private StoreClient $storeClient,
        private AbstractExtensionDataProvider $extensionDataProvider
    ) {
    }

    /** * @return list<Compatibility> */
    public function getExtensionCompatibilities(Version $update, Context $context, ?ExtensionCollection $extensions = null): array
    {
        if ($extensions === null) {
            $extensions = $this->fetchActiveExtensions($context);
        }

        try {
            $storeInfo = $this->storeClient->getExtensionCompatibilities($context$update->version, $extensions);
        } catch (ClientException $e) {
            if ($e->getResponse()->getStatusCode() === Response::HTTP_BAD_REQUEST) {
                $storeInfo = [];
            } else {
                throw $e;
            }
        }

        
Home | Imprint | This part of the site doesn't use cookies.