Quick start
Bumpversion is a PHP command-line tool for keeping version strings in sync across a project. It uses Semantic Versioning 2.0.0 and can release curated Keep a Changelog entries alongside your code.
Install
Use PHP 8.3 or newer:
composer require --dev janalis/bumpversionConfigure the files to update
Create a VERSION file containing 1.0.0, then initialize the configuration:
vendor/bin/bumpversion init --no-interaction --current-version=1.0.0 --path=VERSIONAdd more --path options for additional files or directories. You can also run init interactively. Paths resolve relative to the configuration file.
Preview and bump
vendor/bin/bumpversion bump --dry-run
vendor/bin/bumpversion bumpThe default increment changes 1.0.0 to 1.0.1. Select a larger increment:
vendor/bin/bumpversion bump --type=minor
vendor/bin/bumpversion bump --type=majorPrepare a Git release
Commit the project configuration and any other pending work first. Then:
vendor/bin/bumpversion bump --commit --tag --dry-run
vendor/bin/bumpversion bump --commit --tagThe commit includes only the planned release files. Publishing remains an explicit step you perform yourself.
Next, add a curated changelog or read the configuration and CLI reference.