UnreleasedChangelogConflictResolver

Class
Read only: Yes Final: Yes

Rebuilds the active Unreleased section from predictable changelog conflicts.

Table of Contents

Properties

Methods

 : mixed
resolve()

Merges source Unreleased entries into the target changelog document.

 : string
 : array<int, string>
Properties
Methods

resolve()

Public

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