PHPackages                             dr-bock/git-changelog - 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. dr-bock/git-changelog

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

dr-bock/git-changelog
=====================

(Markdown) changelog generator from git history

0.1.4(6y ago)115.9k—2.9%[1 issues](https://github.com/dr-bock/git-changelog/issues)GPL-3.0PHPPHP &gt;=7.2

Since Aug 5Pushed 6y ago1 watchersCompare

[ Source](https://github.com/dr-bock/git-changelog)[ Packagist](https://packagist.org/packages/dr-bock/git-changelog)[ RSS](/packages/dr-bock-git-changelog/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (7)Used By (0)

GIT Changelog Generator
=======================

[](#git-changelog-generator)

> composer require --dev dr-bock/git-changelog

Composer package which provides services to generate a changelog for your composer-project from your local git history.

The package is still a beta version. Not all features are fully supported yet. Until the first stable release there may be breaking changes. Use at your own risk.

### Disclaimer

[](#disclaimer)

I know there are many node- or python-scripts that create a changelog. But I'm a PHP developer and wanted something I could really handle. Maybe nobody but me needs this package.

### Installation and Usage...

[](#installation-and-usage)

Add this package to your composer project (ideally as dev-requirement). In the deployed project you certainly don't want to create a changelog.

#### ...as composer command

[](#as-composer-command)

Add this configuration to your projects composer.json:

```
 "config": {
    "dr-bock/git-changelog": {
      "commitUrl": "https://your.bitbucket.server/projects/your-project/repos/your-repo/commits/%HASH%",
      "issueUrl": "https://your.jira.server/browse/%ISSUE%",
      "changelogIndexFile": "../CHANGELOG.md",
      "changelogFolder": "../Documentation/Changelog/",
      "issueFormat": "jira"
    }
  },

```

Possible options:

OptionDescriptioncommitUrlUrl to a single Commit in your Git-Repository, you can use "%HASH%" and "%SHOT\_HASH%" as placeholder for the commit hash.issueUrlUrl to a issue in your helpdesk software. You can use "%ISSUE% as placeholder for the ticket number.changelogIndexFileRelative path (from your composer projects root) to the changelog overview file.changelogFolderRelative path (from your composer projects root) to the folder, where to place the detailed changelog files.issueFormatFormat in which issues are tagged in commit message. E.g. "#1234" ("github") or "FOO-12345" ("jira"). Currently only the JIRA format is supported.Add this script to your projects composer.json:

```
"scripts": {
    "generate-changelog": [
      "DrBock\\GitChangeLog\\Composer\\GeneratorCommand::generate"
    ]
}

```

A changelog can now be generated with the following command (in the root directory of your composer project):

```
composer generate-changelog -- releaseDate=2019-08-01 releaseName="My cool new Feature Relese" fromTag="release-2019-07-01"

```

Options overview:

OptionDescriptionreleaseDateDate of the release. Format: 2019-08-24requiredreleaseNameName of the releaseoptionalfromTagIf a tag is specified, the changelog is only created from the commits created after this git tag (revision). Ideally the tag of the last release should be used here.optionalfromDateIn addition, the selection of commits used to create the changelog can be restricted by a start date. Format: 2019-08-24optionaltoDateIn addition, the selection of commits used to create the changelog can be restricted by an end date. Format: 2019-08-24optionalsortingSpecify the sorting of the commits in changelog. ASC (default) or DESC.optionaldryRunIf set, no files are written and the result is only displayed in the console.optional#### ...as php library

[](#as-php-library)

```
/**
 * Samples for Generation of a markdown changelog
 */

$generatorOptions = new GeneratorOptions();
$generatorOptions->setProjectName('My Cool Project')
    ->setOutputFormat(MarkdownOutputAdapter::FORMAT) // 'markdown'
    ->setIssueFormat(IssueFormatHelper::JIRA) // 'jira'
    ->setChangelogIndexFile('CHANGELOG.md')
    ->setChangelogFolder('Documentation/Changelog/')
    ->setIssueUrl('https://your.bitbucket.server/projects/your-project/repos/your-repo/commits/%HASH%')
    ->setCommitUrl('https://your.jira.server/browse/%ISSUE%')
    ->setReleaseDate(new \DateTime('2019-08-24'))
    ->setfromTag('release-2019-07-01')
    ->setReleaseName('My cool release');

$generator = new ChangeLogGenerator($generatorOptions);
$generator->generate();

```

### Screenshots

[](#screenshots)

Example changelog index:

[![Changelog index](Documentation/_img/changelog-index.png "Changelog index")](Documentation/_img/changelog-index.png)

Example changelog details:

[![Changelog details](Documentation/_img/changelog-details.png "Changelog details")](Documentation/_img/changelog-details.png)

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~26 days

Total

5

Last Release

2422d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fff8a6c653ceafafe3602e071ca3670f25829280bc70d891d91051c685473e78?d=identicon)[dr-bock](/maintainers/dr-bock)

---

Top Contributors

[![dr-bock](https://avatars.githubusercontent.com/u/18004457?v=4)](https://github.com/dr-bock "dr-bock (11 commits)")

---

Tags

gitchangelog

### Embed Badge

![Health badge](/badges/dr-bock-git-changelog/health.svg)

```
[![Health](https://phpackages.com/badges/dr-bock-git-changelog/health.svg)](https://phpackages.com/packages/dr-bock-git-changelog)
```

###  Alternatives

[marcocesarato/php-conventional-changelog

Generate changelogs and release notes from a project's commit messages and metadata and automate versioning with semver.org and conventionalcommits.org

2521.5M119](/packages/marcocesarato-php-conventional-changelog)[czproject/git-php

Library for work with Git repository in PHP.

5645.2M112](/packages/czproject-git-php)[pyrech/composer-changelogs

Display changelogs after each composer update

5904.2M31](/packages/pyrech-composer-changelogs)[cypresslab/gitelephant

An abstraction layer for git written in PHP

6131.2M31](/packages/cypresslab-gitelephant)[teqneers/php-stream-wrapper-for-git

Git Stream Wrapper for PHP

2892.2M8](/packages/teqneers-php-stream-wrapper-for-git)[ramsey/conventional-commits

A PHP library for creating and validating commit messages according to the Conventional Commits specification. Includes a CaptainHook action!

1931.6M155](/packages/ramsey-conventional-commits)

PHPackages © 2026

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