PHPVersionCheck example

$userLang = $this->getUserLanguage($user);

        $namespace = $this->get('snippets')->getNamespace('backend/swag_update/main');

        $endpoint = $this->container->getParameter('shopware.store.apiEndpoint');

        $fileSystem = new SwagUpdateFileSystem();
        $conn = $this->get(Connection::class);
        $checks = [
            new RegexCheck($userLang),
            new MySQLVersionCheck($namespace),
            new PHPVersionCheck($namespace),
            new EmotionTemplateCheck($conn$namespace),
            new PHPExtensionCheck($namespace),
            new WritableCheck($fileSystem$namespace),
            new LicenseCheck($conn$endpoint$this->getShopwareVersion()$namespace),
        ];
        $validation = new Validation($checks);

        $this->View()->assign([
            'success' => true,
            'data' => $validation->checkRequirements($data->checks),
        ]);
    }
Home | Imprint | This part of the site doesn't use cookies.