PHPackages                             vdhicts/keepachangelog-parser - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. vdhicts/keepachangelog-parser

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

vdhicts/keepachangelog-parser
=============================

Parser for the Keep A Changelog standard

v2.4.0(1mo ago)412.2k↓20.8%3MITPHPPHP &gt;=8.2CI passing

Since Feb 15Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/vdhicts/keepachangelog-parser)[ Packagist](https://packagist.org/packages/vdhicts/keepachangelog-parser)[ Docs](https://github.com/vdhicts/keepachangelog-parser)[ RSS](/packages/vdhicts-keepachangelog-parser/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (14)Versions (10)Used By (0)

keepachangelog-parser
=====================

[](#keepachangelog-parser)

Parser for the Keep A Changelog standard.

Requirements
------------

[](#requirements)

This package requires at least PHP 8.2 or newer.

Installation
------------

[](#installation)

You can install the package via composer:

`composer require vdhicts/keepachangelog-parser`

Usage
-----

[](#usage)

This package is intended to be easy to use.

### Parsing the changelog

[](#parsing-the-changelog)

```
$content = file_get_contents('CHANGELOG.md');

$parser = new \Vdhicts\KeepAChangelog\Parser();
$changelog = $parser->parse($content);
```

### Using a different date format

[](#using-a-different-date-format)

The parser will parse the releases with the `Y-m-d` format by default. If you would like to use another format, you can just pass the format to the `setDateFormat` function.

```
$content = file_get_contents('CHANGELOG.md');

$parser = new \Vdhicts\KeepAChangelog\Parser();
$changelog = $parser
    ->setDateFormat('Y-m-d H:i:s')
    ->parse($content);
```

### Accessing the changelog

[](#accessing-the-changelog)

The parser will return a `Changelog` models, with contains a collection of `Release` models. The `Release` model contains a collection of `Section` models.

The changelog has several methods the retrieve information:

```
// Get the description of the changelog, which returns an array of lines
$descriptionHtml = implode('', $changelog->getDescription());

// Determine if the changelog has any releases
$changelog->hasReleases();

// Get the unreleased section
$unreleased = $changelog->getUnreleased();

// Get the latest release
$latestRelease = $changelog->getLatestRelease();
```

When all releases are retrieved, the newest will be the first and the unreleased will be the last one when present.

The release has several methods to get information about the release:

```
// Determine if the current one is the unreleased section
$isUnreleased = $release->isUnreleased();

// Get the version for the release
$version = $release->getVersion();

// Get the release date, will be null when not released or a date isn't provided
$data = $release->getReleasedAt();

// Get the tag reference, usually something like https://github.com/vdhicts/keepachangelog-parser/compare/v0.0.1...v1.0.0
$tagReference = $release->getTagReference();

// Get a specific section of the release
$added = $release->getSection(Section::ADDED);

// Get the collection of sections for the release
$sections = $release->getSections();
```

The section consists of a type (like Added, etc.) and an array of entries:

```
$type = $section->getType();
$entries = $section->getEntries();

$entriesHtml = implode('', $entries);
```

Tests
-----

[](#tests)

Unit tests are available in the `tests` folder. Run with:

`composer test`

When you want a code coverage report which will be generated in the `build/report` folder. Run with:

`composer test-coverage`

Contribution
------------

[](#contribution)

Any contribution is welcome, but it should meet the PSR-12 standard and please create one pull request per feature/bug. In exchange, you will be credited as contributor on this page.

Security
--------

[](#security)

If you discover any security related issues in this or other packages of Vdhicts, please email instead of using the issue tracker.

Support
-------

[](#support)

If you encounter a problem with this parser or has a question about it, feel free to open an issue on GitHub.

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).

###  Health Score

55

—

FairBetter than 97% of packages

Maintenance95

Actively maintained with recent releases

Popularity30

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 82.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~213 days

Recently: every ~272 days

Total

8

Last Release

51d ago

Major Versions

v1.2.0 → v2.0.02023-03-23

PHP version history (3 changes)v1.0.0PHP ^8.0|^8.1

v2.0.0PHP &gt;=8.1

v2.3.0PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/88d23e7b707d1cfe0eea91c00590613f45e0c75cb0a3ce89354328332e5c0c02?d=identicon)[vdhicts](/maintainers/vdhicts)

---

Top Contributors

[![dvdheiden](https://avatars.githubusercontent.com/u/90568118?v=4)](https://github.com/dvdheiden "dvdheiden (32 commits)")[![julesjanssen](https://avatars.githubusercontent.com/u/492036?v=4)](https://github.com/julesjanssen "julesjanssen (4 commits)")[![fabianpnke](https://avatars.githubusercontent.com/u/36986615?v=4)](https://github.com/fabianpnke "fabianpnke (3 commits)")

---

Tags

keepachangelogphpparserchangelog

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/vdhicts-keepachangelog-parser/health.svg)

```
[![Health](https://phpackages.com/badges/vdhicts-keepachangelog-parser/health.svg)](https://phpackages.com/packages/vdhicts-keepachangelog-parser)
```

###  Alternatives

[scotteh/php-dom-wrapper

Simple DOM wrapper to select nodes using either CSS or XPath expressions and manipulate results quickly and easily.

1471.9M10](/packages/scotteh-php-dom-wrapper)[dimabdc/php-fast-simple-html-dom-parser

PHP Fast Simple HTML DOM parser.

9352.6k](/packages/dimabdc-php-fast-simple-html-dom-parser)[sbsaga/toon

🧠 TOON for Laravel — a compact, human-readable, and token-efficient data format for AI prompts &amp; LLM contexts. Perfect for ChatGPT, Gemini, Claude, Mistral, and OpenAI integrations (JSON ⇄ TOON).

6115.6k](/packages/sbsaga-toon)[xparse/element-finder

Elegant data scrapping

3445.0k2](/packages/xparse-element-finder)[pherum/laravel-bbcode

Parse your BBCode easy with this library.

2427.5k](/packages/pherum-laravel-bbcode)[phanan/poddle

Parse podcast feeds with PHP following PSP-1 Podcast RSS Standard

1721.4k1](/packages/phanan-poddle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
