Search by

janalis / bumpversion

phcorp

A PHP CLI to update version strings and prepare Git releases.

Package info

github.com/janalis/bumpversion

pkg:composer/janalis/bumpversion

Statistics

Installs: 12

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 2

v0.1.1 2026-10-16 02:54 UTC

This package is auto-updated.

Last update: 2026-10-21 13:44:47 UTC


README

Bumpversion

Bumpversion

One version. Every file.
PHP CLI · Semantic Versioning · Keep a Changelog · Git releases

CI Docs Latest release Packagist MIT license

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-run before 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 --commit and --tag controls, 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