getNextMajorVersionChanges example

$title = ChangelogSection::administration->value;
                $getContentFnc = static fn (ChangelogDefinition $definition): ?string => $definition->getAdministration();

                break;
            case ChangelogSection::upgrade->name:
                $title = ChangelogSection::upgrade->value;
                $getContentFnc = static fn (ChangelogDefinition $definition): ?string => $definition->getUpgradeInformation();

                break;
            case ChangelogSection::major->name:
                $title = ChangelogSection::major->value;
                $getContentFnc = static fn (ChangelogDefinition $definition): ?string => $definition->getNextMajorVersionChanges();

                break;
        }
        $changes = [];
        foreach ($collection as $changelog) {
            $content = $getContentFnc($changelog->getDefinition());
            if (!empty($content)) {
                $changes[] = $content;
            }
        }

        

    private function releaseMajorUpgradeInformation(
        array $output,
        string $version,
        ChangelogFileCollection $collection,
        bool $dryRun = false
    ): array {
        $append = [];
        foreach ($collection as $changelog) {
            $upgrade = $changelog->getDefinition()->getNextMajorVersionChanges();
            if ($upgrade) {
                $append[] = $upgrade;
            }
        }
        if (!\count($append)) {
            return $output;
        }

        $nextMajorVersionHeadline = '# ' . $this->getNextMajorVersion($version) . '.0.0' . \PHP_EOL;

        array_unshift($appendsprintf('## Introduced in %s', $version));

        
static::assertSame($expectedData['title']$logEntry->getTitle());
        static::assertSame($expectedData['issue']$logEntry->getIssue());
        static::assertSame($expectedData['flag']$logEntry->getFlag());
        static::assertSame($expectedData['author']$logEntry->getAuthor());
        static::assertSame($expectedData['authorEmail']$logEntry->getAuthorEmail());
        static::assertSame($expectedData['authorGithub']$logEntry->getAuthorGitHub());
        static::assertSame($expectedData['core']$logEntry->getCore());
        static::assertSame($expectedData['storefront']$logEntry->getStorefront());
        static::assertSame($expectedData['admin']$logEntry->getAdministration());
        static::assertSame($expectedData['api']$logEntry->getApi());
        static::assertSame($expectedData['upgrade']$logEntry->getUpgradeInformation());
        static::assertSame($expectedData['major']$logEntry->getNextMajorVersionChanges());
        $lines = file($outFile);
        static::assertIsArray($lines);

        /** @var array<string> $templateLines */
        $templateLines = explode(\PHP_EOL, $logEntry->toTemplate());

        foreach ($lines as $index => $line) {
            static::assertSame(trim($line)trim($templateLines[$index]));
        }

        $result = self::getContainer()->get(ValidatorInterface::class)->validate($logEntry);

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