Renders Keep a Changelog markdown in a deterministic package-friendly format.
Interfaces
Constants
= "# Changelog\n\nAll notable changes to this project will be documented in this file.\n\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),\nand this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)."
Methods
render()
: string
Renders the full changelog markdown content.
renderReleaseBody()
: string
Renders only the body content of one released version.
normalizeRepositoryUrl()
: string|null
Normalizes repository URLs to the public HTTPS form expected by footer links.
: array<int, string>
: array<int, string>
resolveTag()
: string
Resolves the git tag name for a rendered release.
Constants
private
mixed
INTRODUCTION
=
"# Changelog\n\nAll notable changes to this project will be documented in this file.\n\nThe format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),\nand this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html)."
Renders the full changelog markdown content.
public
render(ChangelogDocument
$document[,
string|null
$repositoryUrl = null]) : string
Parameters
$repositoryUrl
:
string|null
=
null
Return values
string
Renders only the body content of one released version.
public
renderReleaseBody(ChangelogRelease
$release) : string
Parameters
Return values
string
Normalizes repository URLs to the public HTTPS form expected by footer links.
private
normalizeRepositoryUrl(
string|null
$repositoryUrl) : string|null
Parameters
$repositoryUrl
:
string|null
Return values
string|null
private
renderReferences(ChangelogDocument
$document,
string|null
$repositoryUrl) : array<int, string>
Parameters
$repositoryUrl
:
string|null
Return values
array<int, string>
private
renderRelease(ChangelogRelease
$release) : array<int, string>
Parameters
Return values
array<int, string>
Resolves the git tag name for a rendered release.
private
resolveTag(ChangelogRelease
$release) : string
Parameters
Return values
string