PluginCheck example

return new CurlClient();
        };

        $container['store.api'] = function D) use ($me) {
            return new StoreApi(
                $me->get('http-client'),
                $me->getParameter('storeapi.endpoint')
            );
        };

        $container['plugin.check'] = function D) use ($me) {
            return new PluginCheck(
                $me->get('store.api'),
                $me->get('db'),
                $me->get('shopware.version')
            );
        };

        $container['dummy.plugin.finder'] = function D) {
            return new DummyPluginFinder(SW_PATH);
        };

        $container['cleanup.files.finder'] = function D) {
            
/** @var Connection $connection */
        $connection = $this->get(\Doctrine\DBAL\Connection::class);
        $sql = "INSERT IGNORE INTO `s_core_config_elements` (`id`, `form_id`, `name`, `value`, `label`, `description`, `type`, `required`, `position`, `scope`) VALUES (NULL, '0', 'updateWizardStarted', 'b:1;', '', '', 'checkbox', '0', '0', '1');";
        $connection->executeUpdate($sql);

        Shopware()->Container()->get(\Shopware\Components\CacheManager::class)->clearConfigCache();
    }

    public function updateAction()
    {
        $pluginCheck = new \ShopwarePlugins\SwagUpdate\Components\PluginCheck($this->container);

        /** @var PluginLicenceService $licenceService */
        $licenceService = $this->get(\Shopware\Bundle\PluginInstallerBundle\Service\PluginLicenceService::class);

        /** @var AccountManagerService $accountService */
        $accountService = $this->get(\Shopware\Bundle\PluginInstallerBundle\Service\AccountManagerService::class);

        $request = new UpdateLicencesRequest(
            $this->getVersion(),
            $this->getLocale(),
            $accountService->getDomain(),
            
if (!$data instanceof Version) {
            $this->View()->assign([
                'success' => false,
                'data' => [],
            ]);

            return;
        }

        $version = $data->version;

        $pluginCheck = new PluginCheck($this->container);
        $result = $pluginCheck->checkInstalledPluginsAvailableForNewVersion($version);

        $this->View()->assign([
            'success' => true,
            'data' => $result,
        ]);
    }

    /** * @return void */
    
Home | Imprint | This part of the site doesn't use cookies.