UnreleasedChangelogConflictResolver
Class
Read only:
Yes
Final:
Yes
Rebuilds the active Unreleased section from predictable changelog conflicts.
Properties
Methods
: mixed
resolve()
: string
Merges source Unreleased entries into the target changelog document.
: array<int, string>
private
ChangelogParserInterface
$parser
private
MarkdownRendererInterface
$renderer
public
__construct(ChangelogParserInterface
$parser, MarkdownRendererInterface
$renderer) : mixed
Parameters
Merges source Unreleased entries into the target changelog document.
public
resolve(
string
$targetContents,
array<int, string>
$sourceContents[,
string|null
$repositoryUrl = null]) : string
Description
The target SHOULD be the current base branch changelog. This preserves newly published release sections when a release happened while the pull request branch was waiting, then re-adds branch-only Unreleased entries to the current top-level Unreleased section.
Parameters
$targetContents
:
string
$sourceContents
:
array<int, string>
$repositoryUrl
:
string|null
=
null
Return values
string
private
flattenEntries(ChangelogDocument
$document) : array<int, string>
Parameters
Return values
array<int, string>