Skip to content

ChangelogDocument

github-actions edited this page Apr 20, 2026 · 1 revision

Represents the minimal Keep a Changelog document structure used by dev-tools.


  • Full name: \FastForward\DevTools\Changelog\Document\ChangelogDocument
  • This class is marked as final and can't be subclassed
  • This class is a Final class

Constants

Constant Visibility Type Value
UNRELEASED_VERSION public 'Unreleased'

Methods

__construct

public __construct(list<\FastForward\DevTools\Changelog\Document\ChangelogRelease> $releases): mixed

Parameters:

Parameter Type Description
$releases list<\FastForward\DevTools\Changelog\Document\ChangelogRelease>

create

Creates a new document with an empty Unreleased section.

public static create(): self
  • This method is static.

getReleases

Returns the release sections in document order.

public getReleases(): list<\FastForward\DevTools\Changelog\Document\ChangelogRelease>

getUnreleased

Returns the Unreleased section, creating an empty one when needed.

public getUnreleased(): \FastForward\DevTools\Changelog\Document\ChangelogRelease

getRelease

Returns the requested release section when present.

public getRelease(string $version): ?\FastForward\DevTools\Changelog\Document\ChangelogRelease

Parameters:

Parameter Type Description
$version string

getLatestPublishedRelease

Returns the newest published release section when available.

public getLatestPublishedRelease(): ?\FastForward\DevTools\Changelog\Document\ChangelogRelease

withRelease

Returns a copy with the provided release inserted or replaced.

public withRelease(\FastForward\DevTools\Changelog\Document\ChangelogRelease $target): self

Parameters:

Parameter Type Description
$target \FastForward\DevTools\Changelog\Document\ChangelogRelease

promoteUnreleased

Returns a copy with the unreleased entries promoted into a published release.

public promoteUnreleased(string $version, string $date): self

Parameters:

Parameter Type Description
$version string
$date string

Clone this wiki locally