symplify/changelog-linker 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

symplify/changelog-linker

最新稳定版本:v9.2.6

Composer 安装命令:

composer require symplify/changelog-linker

包简介

Generates beautiful CHANGELOG.md with links to PRs, versions and users grouped in Added/Changed/Fixed/Removed categories.

README 文档

README

This package is deprecated. Do you want to take it over or look for replacement? See the issue


Downloads

Turn your CHANGELOG.md from a machine readable text to a rich text that makes every programmer happy.

Install

composer require symplify/changelog-linker --dev

Usage

Create changelog-linker.php with configuration:

use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; use Symplify\ChangelogLinker\ValueObject\Option; return static function (ContainerConfigurator $containerConfigurator): void { $parameters = $containerConfigurator->parameters(); // this parameter is detected from "git origin", but you can change it $parameters->set(Option::REPOSITORY_URL, 'https://github.com/symplify/symplify'); };

The config is autodiscovered in the root directory or by --config option.

A. Dump Merges

vendor/bin/changelog-linker dump-merges

Write or Dry-run?

The --dry-run option prints the result to the output. Without that, I looks for <!-- changelog-linker --> in the CHANGELOG.md to replace with the content.

It finds the last #ID in the CHANGELOG.md, than looks on Github via API and dumps all the merged PRs since the last #ID in nice format. In case you want to specify minimal PR id yourself, use this:

vendor/bin/changelog-linker dump-merges --since-id 125

But that is a mash-up of everything. Not very nice:

## Unreleased - [#868] [ChangelogLinker] Add ChangeTree to manage merge messages - [#867] [ChangelogLinker] Change Worker registration from implicit to explicit - [#865] Improve Code Complexity - [#864] [MonorepoBuilder] improve coverage

What if we'd have Added, Changed... all the standard categories?

use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; use Symplify\ChangelogLinker\ValueObject\ChangelogFormat; use Symplify\ChangelogLinker\ValueObject\Option; return static function (ContainerConfigurator $containerConfigurator): void { $parameters = $containerConfigurator->parameters(); $parameters->set(Option::CHANGELOG_FORMAT, ChangelogFormat::CATEGORIES_ONLY); };
vendor/bin/changelog-linker dump-merges

## Unreleased ### Added - [#828] [ChangelogLinker] Add Unreleased to last tagged version feature - [#840] [ChangelogLinker] Add LinkifyWorker

Nice, now everything is nicely grouped.

(Do you want to know how we detect the category? Follow me)

You have 4 packages/cateogires options you can use:

Symplify\ChangelogLinker\ValueObject\ChangelogFormat::PACKAGES_THEN_CATEGORIES; Symplify\ChangelogLinker\ValueObject\ChangelogFormat::CATEGORIES_THEN_PACKAGES; Symplify\ChangelogLinker\ValueObject\ChangelogFormat::CATEGORIES_ONLY; Symplify\ChangelogLinker\ValueObject\ChangelogFormat::PACKAGES_ONLY;

Base Branch

Do you want to dump only such pull requests that were merged into a particular branch? Just use base-branch option:

vendor/bin/changelog-linker dump-merges --base-branch=7.3

This is very handy when you support multiple versions of your project.

Github API Overload?

In case you cross the API rate limit and get denied, create new Github Token and run it via GITHUB_TOKEN ENV variable.

GITHUB_TOKEN super-secret-token vendor/bin/changelog-linker dump-merges

B. Decorate CHANGELOG.md

vendor/bin/changelog-linker link

1. Link PR and Issues

 ### Added -- #123 Cool new without detailed description wanting me to see PR, [closes #234] +- [#123] Cool new without detailed description wanting me to see PR, [closes [#234]] + +[#123]: https://github.com/symplify/symplify/pull/123 +[#234]: https://github.com/symplify/symplify/pull/234

2. Link Versions to Diffs

-## v2.0.0 - 2017-12-31 +## [v2.0.0] - 2017-12-31 - ... ## v1.5.0 - 2017-06-30 + +[v2.0.0]: https://github.com/symplify/symplify/compare/v1.5.0...v2.0.0

3. Can I Thank My Contributors?

Of course! Give your contributors credit they deserve:

 ### [v2.0.0] - 2017-12-31 -- ... thanks @SpacePossum for help +- ... thanks [@SpacePossum] for help + +[@SpacePossum]: https://github.com/SpacePossum

You can exclude core maintainers, to give external contributors more credit:

use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; use Symplify\ChangelogLinker\ValueObject\Option; return static function (ContainerConfigurator $containerConfigurator): void { $parameters = $containerConfigurator->parameters(); // this parameter is detected from "git origin", but you can change it $parameters->set(Option::AUTHORS_TO_IGNORE, ['TomasVotruba']); };

4. How to Link Specific Words?

In Symplify, I need that every EasyCodingStandard word leads to https://github.com/symplify/easy-coding-standard/.

use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; use Symplify\ChangelogLinker\ValueObject\Option; return static function (ContainerConfigurator $containerConfigurator): void { $parameters = $containerConfigurator->parameters(); // this parameter is detected from "git origin", but you can change it $parameters->set(Option::NAMES_TO_URLS, [ 'EasyCodingStandard' => 'https://github.com/symplify/easy-coding-standard/', ]); };
 ## Unreleased ### Added -#### EasyCodingStandard +#### [EasyCodingStandard] + +[EasyCodingStandard]: https://github.com/symplify/easy-coding-standard/

5. Can I Write Shorter PR Titles?

ECS-Run

Just add alias to config:

use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; use Symplify\ChangelogLinker\ValueObject\Option; return static function (ContainerConfigurator $containerConfigurator): void { $parameters = $containerConfigurator->parameters(); // this parameter is detected from "git origin", but you can change it $parameters->set(Option::PACKAGE_ALIASES, [ 'CS' => 'CodingStandard', ]); };

...and it will be resolved to CodingStandard package.


Report Issues

In case you are experiencing a bug or want to request a new feature head over to the Symplify monorepo issue tracker

Contribute

The sources of this package are contained in the Symplify monorepo. We welcome contributions for this package on symplify/symplify.

symplify/changelog-linker 适用场景与选型建议

symplify/changelog-linker 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 752.44k 次下载、GitHub Stars 达 85, 最近一次更新时间为 2026 年 01 月 03 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 symplify/changelog-linker 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 symplify/changelog-linker 我们能提供哪些服务?
定制开发 / 二次开发

基于 symplify/changelog-linker 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 752.44k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 85
  • 点击次数: 27
  • 依赖项目数: 7
  • 推荐数: 2

GitHub 信息

  • Stars: 85
  • Watchers: 5
  • Forks: 7
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-03