janalis / bumpversion
A PHP CLI to update version strings and prepare Git releases.
Requires
- php: ^8.3
- nyholm/psr7: ^1.8
- php-http/discovery: ^1.20
- psr/http-client: ^1.0
- psr/http-factory: ^1.0
- symfony/console: ^7.4
- symfony/finder: ^7.4
- symfony/http-client: ^7.4
- symfony/process: ^7.4
- symfony/yaml: ^7.4
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- guzzlehttp/guzzle: ^7.9
- phpstan/phpstan: ^2.0
- phpunit/phpunit: ^12.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-21 13:44:47 UTC
README
Bumpversion
One version. Every file.
PHP CLI · Semantic Versioning · Keep a Changelog · Git releases
Documentation · Getting started · CLI reference · Changelogs
Bumpversion keeps version strings in sync across your project, releases curated Keep a Changelog entries, and optionally creates Git commits and tags. It is a PHP tool inspired by peritus/bumpversion.
Install
Requires PHP 8.3 or newer. Git is needed only for Git release actions.
composer require --dev janalis/bumpversion
See Installation for Composer, standalone PHARs, and building from source.
Quick start
From a project containing a VERSION file with 1.0.0:
vendor/bin/bumpversion init --no-interaction --current-version=1.0.0 --path=VERSION vendor/bin/bumpversion bump --dry-run # preview changes vendor/bin/bumpversion bump # 1.0.0 → 1.0.1 vendor/bin/bumpversion bump --type=minor # next minor version vendor/bin/bumpversion bump --type=major --pre-release=alpha vendor/bin/bumpversion bump --commit --tag --dry-run # preview a Git release
Run init interactively to choose a version, changelog, and files or directories.
Git releases require a clean working tree and stage only planned release files.
Nothing is pushed.
Highlights
- Semantic Versioning 2.0.0: major, minor, patch, prerelease counters, and explicit targets; correct precedence with arbitrary-length numeric components.
- Keep a Changelog: release curated Unreleased entries into dated sections, preserve history, and maintain comparison links.
- Preview changes with
--dry-runbefore updating any files, commits, or tags. - Scoped file updates: exact paths and complete version tokens, with validated edit plans and permission preservation.
- Optional Git releases: independent
--commitand--tagcontrols, without staging unrelated files. - Built-in publishing: prepare releases, extract curated notes, and publish verified GitHub assets and Packagist versions with PSR-18 HTTP clients.
Configuration
init creates bumpversion.yaml:
bumpversion: version: 1.0.0 paths: - VERSION - src changelog: null
Paths resolve relative to the configuration directory. Set changelog to an
existing Keep a Changelog file to release its Unreleased section alongside the
version update. Commit the configuration so contributors share the same process.
See the configuration reference, Git release guide, and migration notes.
Contributing
Contributions are welcome. Read CONTRIBUTING.md and the contributor guide. Security reporting guidance is in SECURITY.md.
composer install npm ci --prefix docs make fmt # format PHP make verify # checks, tests, packaging, and docs make docs-dev # preview the documentation