Applies changelog mutations and derived release metadata.
Interfaces
Properties
Methods
Adds a changelog entry to the selected release section.
Returns the next semantic version inferred from unreleased entries.
Loads and parses the changelog file.
Promotes the Unreleased section into a published release.
Returns the rendered notes body for a specific released version.
Persists the rendered changelog document to disk.
Resolves the canonical repository URL for compare links.
private
FilesystemInterface
$filesystem
private
GitClientInterface
$gitClient
private
ChangelogParserInterface
$parser
private
MarkdownRendererInterface
$renderer
public
__construct(FilesystemInterface
$filesystem, ChangelogParserInterface
$parser, MarkdownRendererInterface
$renderer, GitClientInterface
$gitClient) : mixed
Parameters
Adds a changelog entry to the selected release section.
public
addEntry(
string
$file, ChangelogEntryType
$type,
string
$message[,
string
$version = ChangelogDocument::UNRELEASED_VERSION][,
string|null
$date = null]) : void
Parameters
$file
:
string
$message
:
string
$date
:
string|null
=
null
Returns the next semantic version inferred from unreleased entries.
public
inferNextVersion(
string
$file[,
string|null
$currentVersion = null]) : string
Parameters
$file
:
string
$currentVersion
:
string|null
=
null
Return values
Loads and parses the changelog file.
public
load(
string
$file) : ChangelogDocument
Parameters
$file
:
string
Return values
Promotes the Unreleased section into a published release.
public
promote(
string
$file,
string
$version,
string
$date) : void
Parameters
$file
:
string
$version
:
string
$date
:
string
Returns the rendered notes body for a specific released version.
public
renderReleaseNotes(
string
$file,
string
$version) : string
Parameters
$file
:
string
$version
:
string
Return values
Persists the rendered changelog document to disk.
private
persist(
string
$file, ChangelogDocument
$document) : void
Parameters
$file
:
string
Resolves the canonical repository URL for compare links.
private
resolveRepositoryUrl(
string
$workingDirectory) : string|null
Parameters
$workingDirectory
:
string