fetchLicenses example

return \json_decode((string) $response->getBody(), true, flags: \JSON_THROW_ON_ERROR)['signature'];
    }

    public function listMyExtensions(ExtensionCollection $extensions, Context $context): ExtensionCollection
    {
        try {
            $payload = ['plugins' => array_map(fn (ExtensionStruct $e) => [
                'name' => $e->getName(),
                'version' => $e->getVersion(),
            ]$extensions->getElements())];

            $response = $this->fetchLicenses($payload$context);
        } catch (ClientException $e) {
            throw new StoreApiException($e);
        }

        $body = \json_decode($response->getBody()->getContents(), true, flags: \JSON_THROW_ON_ERROR);

        $myExtensions = new ExtensionCollection();

        foreach ($body as $item) {
            $extension = $this->extensionLoader->loadFromArray($context$item['extension']);
            $extension->setSource(ExtensionStruct::SOURCE_STORE);
            
Home | Imprint | This part of the site doesn't use cookies.