Compares unreleased changelog entries against the current branch or a base ref.
Interfaces
Properties
Methods
__construct()
: mixed
Constructs a new UnreleasedEntryChecker.
hasPendingChanges()
: bool
Checks if there are pending unreleased entries in the changelog compared to a given reference.
flattenEntries()
: array<int, string>
Flattens release entries for set comparison.
private
FilesystemInterface
$filesystem
private
GitClientInterface
$gitClient
private
ChangelogParserInterface
$parser
Constructs a new UnreleasedEntryChecker.
public
__construct(FilesystemInterface
$filesystem, GitClientInterface
$gitClient, ChangelogParserInterface
$parser) : mixed
Parameters
Description
the Git client used for baseline inspection
Checks if there are pending unreleased entries in the changelog compared to a given reference.
public
hasPendingChanges(
string
$file[,
string|null
$againstReference = null]) : bool
Parameters
$file
:
string
Description
the changelog file path to inspect
$againstReference
:
string|null
=
null
Description
The reference to compare against (e.g., a branch or commit hash).
Return values
bool
Description
true if there are pending unreleased entries, false otherwise
Flattens release entries for set comparison.
private
flattenEntries(ChangelogRelease
$release) : array<int, string>
Parameters
Return values
array<int, string>