PHPackages                             syonix/changelog-viewer - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. syonix/changelog-viewer

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

syonix/changelog-viewer
=======================

This package offers a nice display for change log files

v1.0.0(1y ago)31.5k↓16.7%4MITPHP

Since Jan 23Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Syonix/changelog-viewer)[ Packagist](https://packagist.org/packages/syonix/changelog-viewer)[ RSS](/packages/syonix-changelog-viewer/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (12)Used By (0)

Changelog Viewer
================

[](#changelog-viewer)

[![Build Status](https://camo.githubusercontent.com/5b42d94100995e4fe9c5451acdfdbc086b3c845a3a584d26c2d7008e40520610/68747470733a2f2f7472617669732d63692e6f72672f53796f6e69782f6368616e67656c6f672d7669657765722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/Syonix/changelog-viewer)[![Total Downloads](https://camo.githubusercontent.com/53c1900b53ecd9682073eba30eb37e4d5f346c90ae399169c66b56a1b179e07b/68747470733a2f2f706f7365722e707567782e6f72672f73796f6e69782f6368616e67656c6f672d7669657765722f646f776e6c6f6164732e706e67)](https://packagist.org/packages/syonix/changelog-viewer)[![Latest Stable Version](https://camo.githubusercontent.com/1f760855ff133332e13977aff96da8a1aa71e22ff2c933167f5f25ec3b2af3d5/68747470733a2f2f706f7365722e707567782e6f72672f73796f6e69782f6368616e67656c6f672d7669657765722f762f737461626c652e706e67)](https://packagist.org/packages/syonix/changelog-viewer)[![SensioLabsInsight](https://camo.githubusercontent.com/dd57d85be64ee07cfb62462408ab7bc61c0a7da9accc3ccffbe243d4d84e9b6b/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f66306635326564322d393235632d343431382d626138382d3839633238316266346434342f6d696e692e706e67)](https://insight.sensiolabs.com/projects/f0f52ed2-925c-4418-ba88-89c281bf4d44)

This package offers a nice way to display change logs.

[![Changelog Viewer Screenshot](https://github.com/Syonix/changelog-viewer/raw/master/demo/screenshot.png)](https://github.com/Syonix/changelog-viewer/raw/master/demo/screenshot.png)

Thanks a lot to [Grav CMS](http://getgrav.org) who let me use their design for the changelog modal. I use Grav myself and already replaced several Wordpress pages with it. Go check it out!

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

[](#installation)

### Using [Composer](https://getcomposer.org)

[](#using-composer)

Call `composer require syonix/changelog-viewer`.

### Manual installation

[](#manual-installation)

Download the project files and upload them to your web server. Include the class autoloader `/vendor/autoload.php` or configure your own autoloader.

Usage
-----

[](#usage)

To render a display, just call a factory function like this:

```
use \Syonix\ChangelogViewer\Factory\ViewerFactory;
ViewerFactory::createMarkdownHtmlViewer(__DIR__ . '/../CHANGELOG.md')->build();
```

Processors
----------

[](#processors)

Processors are the component of the library that reads the changelog file. Currently implemented is the `MarkdownProcessor` but you could add any of your own, as long as it implements the `Processor\Processor` Interface.

### MarkdownProcessor

[](#markdownprocessor)

The `MarkdownProcessor` takes the path to a markdown file and returns an `ArrayCollection` containing instances of `Version`. The Markdown file must follow this scheme:

```
# Change Log
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).
```

This header is optional but follows the [Keep A Changelog](http://keepachangelog.com/) recommendation.

```
## [v0.1.0](https://github.com/Syonix/changelog-viewer/releases/tag/v0.1.0) - 2016-01-23
[See full Changelog](https://github.com/Syonix/monolog-viewer/compare/v4.0.1...v4.0.2)
```

This is the version header. It contains the version string (adhering to [Semantic Versioning](http://semver.org/)) and a link where this release can be downloaded.

```
### New
- Initial release
- Modular concept to support different sources and outputs
```

Next are the labels New, Changed and Fixed. `New` is for new features, `Changed` is for existing features that have been improved and `Fixed` is for bugs that have been fixed. Under each label you have a list of changes that fall in this label (category).

This format can be overridden by setting a custom regex:

```
$processor = new MarkdownProcessor($path)
    ->setRegex(array(
            'version' => '/^## \[(v.+)\]\((.+)\) - ([\d-]+)/',
            'changes_url' => '/^\[See full Changelog\]\((.+)\)/',
            'label' => '/^### (.+)/',
            'change' => '/^- (.+)/',
        ));
(new HtmlFormatter($processor))->build();
```

Formatters
----------

[](#formatters)

Formatters are used to display the change log. Currently there is only the `HtmlFormatter` which outputs the change log to HTML, but you could implement anything else.

### HtmlFormatter

[](#htmlformatter)

The `HtmlFormatter` prints nice HTML. You have several options for that:

```
(new HtmlFormatter($processor))
    ->title('Changelog')
    ->modal()
    ->frame(true)
    ->styles(true)
    ->scripts(true)
    ->downloadLinks(true)
    ->output();
```

MethodDefaultDescription`title(string)``Changelog`Change the title of the modal.`modal(bool)``false`If set to true (or empty) the changelog will be displayed as a modal and hidden by default. User javascript functions `openChangelogModal()`, `closeChangelogModal()` and `toggleChangelogModal()` to manipulate.
**Note:** The default behavior when not calling this method is `false` but calling this method without a value will set it to `true`.`frame(bool)``true`If set to `false`, no frame will be printed.`styles(bool)``true`Print styles with the modal. Set to `false` if you want to include your own css.`scripts(bool)``true` if `modal(true)`
 `false` otherwisePrint the scripts used to open and close the modal. Set to `false` if you want to include your own js.
**Note:** Calling `modal(true)` also sets `scripts` to `true`, so if you want to add your own scripts for the modal, make sure you call `scripts(false)` after `modal()`.`downloadLinks(bool)``false`Display a download link for each version. Looks like this:
 [![Download Button](https://github.com/Syonix/changelog-viewer/raw/master/demo/download_button.png)](https://github.com/Syonix/changelog-viewer/raw/master/demo/download_button.png)`build()`Compiles and returns the change log HTML code according to the options above.`output()`Calls `build()` and echoes the HTML code.
Same as `echo (new HtmlFormatter($processor))->build();`Localization
------------

[](#localization)

If your changelog file is written in another language, you can use the `LabelTranslator` so the parser recognizes the labels. Refer to the German example for the structure:

```
{
  "new": "neu",
  "improved": "verbessert",
  "fixed": "behoben",
  "See full Changelog": "Vollständigen Changelog anzeigen"
}
```

Demo
----

[](#demo)

After cloning or downloading the project, you can quickly launch a demo by running `php -S localhost:8081` within the demo directory. Then just open your browser and visit `localhost:8081`.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 95.6% 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 ~349 days

Recently: every ~764 days

Total

10

Last Release

614d ago

Major Versions

v0.1.8 → v1.0.02024-09-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/ab4040af9ad9c50643c83be0be008a751c14be693e6c4e1376b8de692e1f81ce?d=identicon)[syonix](/maintainers/syonix)

---

Top Contributors

[![mpbzh](https://avatars.githubusercontent.com/u/6039062?v=4)](https://github.com/mpbzh "mpbzh (65 commits)")[![fizdalf](https://avatars.githubusercontent.com/u/6625723?v=4)](https://github.com/fizdalf "fizdalf (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/syonix-changelog-viewer/health.svg)

```
[![Health](https://phpackages.com/badges/syonix-changelog-viewer/health.svg)](https://phpackages.com/packages/syonix-changelog-viewer)
```

###  Alternatives

[simshaun/recurr

PHP library for working with recurrence rules

1.6k15.7M40](/packages/simshaun-recurr)[alchemy/zippy

Zippy, the archive manager companion

47522.6M51](/packages/alchemy-zippy)[commerceguys/tax

Tax library with a flexible data model, predefined tax rates, powerful resolving logic.

286763.3k](/packages/commerceguys-tax)[cron/cron-bundle

Symfony cron

1901.5M2](/packages/cron-cron-bundle)[sonata-project/classification-bundle

Symfony SonataClassificationBundle

913.2M20](/packages/sonata-project-classification-bundle)[sylius/promotion

Flexible promotion management for PHP applications.

28477.8k9](/packages/sylius-promotion)

PHPackages © 2026

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