getRelease example

private Kernel $kernel;

    private bool $commandsRegistered = false;

    private bool $skipDatabase = false;

    public function __construct(Kernel $kernel)
    {
        $this->kernel = $kernel;

        parent::__construct('Shopware', $kernel->getRelease()['version'] . ' - /' . $kernel->getEnvironment() . ($kernel->isDebug() ? '/debug' : ''));

        $this->getDefinition()->addOption(new InputOption('--process-isolation', null, InputOption::VALUE_NONE, 'Launch commands from shell as a separate process.'));
        $this->getDefinition()->addOption(new InputOption('--env', '-e', InputOption::VALUE_REQUIRED, 'The Environment name.', $kernel->getEnvironment()));
    }

    /** * Gets the Kernel associated with this Console. * * @return Kernel */
    public function getKernel()
    {

    }

    /** * @param array<string, mixed> $releaseInformation * * @throws UpdatePackageNotFoundException * @throws ReleasePackageNotFoundException */
    private function createVersionFromGithubResponse(string $shopwareVersion, array $releaseInformation): Version
    {
        $latestRelease = $this->getRelease($shopwareVersion$releaseInformation);

        $installPackage = $this->getUpdatePackage($latestRelease['assets']);

        $parts = explode('_', $installPackage['name']);
        $sha1 = array_pop($parts);

        return new Version([
            'version' => $latestRelease['tag_name'],
            'release_date' => $latestRelease['created_at'],
            'size' => $installPackage['size'],
            'uri' => $installPackage['browser_download_url'],
            
Home | Imprint | This part of the site doesn't use cookies.