ChangelogManager

Class
Read only: Yes Final: Yes

Applies changelog mutations and derived release metadata.

Table of Contents

Interfaces

ChangelogManagerInterface

Applies changelog mutations and derives release metadata.

Properties

Methods

 : mixed
addEntry()

Adds a changelog entry to the selected release section.

 : void
inferNextVersion()

Returns the next semantic version inferred from unreleased entries.

 : string
load()

Loads and parses the changelog file.

 : ChangelogDocument
promote()

Promotes the Unreleased section into a published release.

 : void
renderReleaseNotes()

Returns the rendered notes body for a specific released version.

 : string
persist()

Persists the rendered changelog document to disk.

 : void
resolveRepositoryUrl()

Resolves the canonical repository URL for compare links.

 : string|null
Properties
Methods

inferNextVersion()

Public

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
string

promote()

Public

Promotes the Unreleased section into a published release.

public promote( string  $file, string  $version, string  $date) : void
Parameters
$file : string
$version : string
$date : string

renderReleaseNotes()

Public

Returns the rendered notes body for a specific released version.

public renderReleaseNotes( string  $file, string  $version) : string
Parameters
$file : string
$version : string
Return values
string

resolveRepositoryUrl()

Private

Resolves the canonical repository URL for compare links.

private resolveRepositoryUrl( string  $workingDirectory) : string|null
Parameters
$workingDirectory : string
Return values
string|null