fast-forward / changelog
Standalone changelog domain and CLI runtime for Fast Forward PHP packages.
Requires
- php: ^8.5
- composer-runtime-api: ^2.0
- container-interop/service-provider: ^0.4.1
- fast-forward/clock: ^1.0
- fast-forward/container: ^1.6
- psr/clock: ^1.0
- psr/container: ^1.0 || ^2.0
- symfony/console: ^8.1
- symfony/filesystem: ^8.1
- symfony/process: ^8.1
- thecodingmachine/safe: ^3.4
Requires (Dev)
- ext-simplexml: *
- nikic/php-parser: ^5.9
- phpspec/prophecy: ^1.26
- phpspec/prophecy-phpunit: ^2.5
- phpunit/php-code-coverage: ^13.0
- phpunit/phpunit: ^13.0
- rector/rector: ^2.6
- symplify/easy-coding-standard: ^13.3
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-03 20:56:55 UTC
README
Standalone changelog domain and CLI runtime for Fast Forward PHP packages.
✨ Features
- 📘 Parse and render Keep a Changelog 1.1.0 documents deterministically
- 🛠️ Manage changelog entries and promote
Unreleasedinto published releases - 🚀 Expose reusable Symfony Console commands for release automation
- ✅ Check whether
Unreleasedcontains a change relative to a Git baseline - 🔌 Compose services through
fast-forward/containerand load commands lazily
📦 Installation
composer require fast-forward/changelog
Requirements:
- PHP
^8.5 - Symfony Console, Filesystem, and Process
^8.1 fast-forward/containerand a PSR-20 clock supplied byfast-forward/clock
🛠️ Usage
Run the standalone CLI:
vendor/bin/changelog list
vendor/bin/changelog changelog:entry "Add release automation"
vendor/bin/changelog changelog:check --against=origin/main
vendor/bin/changelog changelog:resolve-version
vendor/bin/changelog changelog:promote 1.2.0
vendor/bin/changelog changelog:render-release-notes 1.2.0
The compatibility aliases changelog:next-version, changelog:show, and
changelog:release-notes resolve to the same lazy commands.
Register the package command loader inside another Symfony Console application:
use FastForward\Changelog\Container\ServiceProvider\ChangelogServiceProvider; use Symfony\Component\Console\CommandLoader\CommandLoaderInterface; use Symfony\Component\Console\Application; use function FastForward\Container\container; $container = container(new ChangelogServiceProvider(workingDirectory: '/path/to/project')); $application = new Application('My Tooling'); $application->setCommandLoader($container->get(CommandLoaderInterface::class));
The loader exposes command metadata without constructing command services. A misconfigured dependency therefore fails only when its command is executed and does not prevent the CLI from listing or running unrelated commands.
🧰 API Summary
| Class | Responsibility |
|---|---|
ChangelogManager |
Load, mutate, promote, infer, and render changelog releases |
ChangelogParser |
Parse Markdown into the managed changelog document model |
MarkdownRenderer |
Render deterministic changelog Markdown and release-note bodies |
ChangelogDocument / ChangelogRelease |
Immutable document model for release sections |
UnreleasedEntryChecker |
Compare current entries with an optional Git baseline |
ChangelogServiceProvider |
Register interfaces, factories, the clock, and lazy commands |
🔌 Integration
This package is designed to be shared by:
fast-forward/dev-toolsas an aggregator of reusable CLI domainsfast-forward/github-actionsas a source of changelog-aware workflow commands- standalone package repositories that want deterministic changelog automation
📁 Directory Structure
bin/
docs/
src/
Console/
Container/
Checker/
Document/
Entry/
Filesystem/
Git/
Manager/
Parser/
Renderer/
Version/
tests/
🛡 License
MIT © 2026 Felipe Sayao Lobato Abreu
🤝 Contributing
See contribution instructions for the independent local and
CI quality checks. Run composer check before opening a PR. The unit suite requires 100%
source-line coverage and replaces filesystem, process, clock, and container
collaborators with test doubles.
The foundation extraction map explains what to copy and adapt for a new PHP library and which dependencies belong to this package.
Coverage uses PHPUnit's native Cobertura report in .build/coverage.xml, with
Clover in .build/clover.xml, per-class text and HTML in .build/coverage.
composer coverage:check regenerates the unit report and enforces 100% line
coverage for the production source and every executable class.