UnreleasedEntryCheckerInterface

Interface

Verifies that the changelog contains meaningful unreleased changes.

Description

This is used to prevent merging changes that have not been documented in the changelog. It compares the unreleased entries in the changelog against the current branch or a specified reference (e.g., a base branch or commit hash).

Table of Contents

Methods

hasPendingChanges()

Checks if there are pending unreleased entries in the changelog compared to a given reference.

 : bool
Methods

hasPendingChanges()

Public

Checks if there are pending unreleased entries in the changelog compared to a given reference.

public hasPendingChanges( string  $file[, string|null  $againstReference = null]) : bool

Description

This method MUST read the unreleased section of the changelog and compare it against the changes in the current branch or a specified reference. If there are entries in the unreleased section that are not present in the reference, it indicates that there are pending changes that have not been released yet. The method MUST return true if there are pending unreleased entries, and false otherwise.

Parameters
$file : string

Description

the changelog file path, relative to the working directory or absolute

$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