PHPackages                             fuzzyfox/composer-version - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. fuzzyfox/composer-version

ActiveComposer-plugin[Utility &amp; Helpers](/categories/utility)

fuzzyfox/composer-version
=========================

Adds version management super powers similar to npm version to you project.

v0.1.5(5y ago)1931MPL-2.0PHP

Since Aug 19Pushed 5y ago1 watchersCompare

[ Source](https://github.com/fuzzyfox/composer-version)[ Packagist](https://packagist.org/packages/fuzzyfox/composer-version)[ Docs](https://github.com/fuzzyfox/composer-version)[ RSS](/packages/fuzzyfox-composer-version/feed)WikiDiscussions trunk Synced 3d ago

READMEChangelogDependencies (2)Versions (7)Used By (0)

composer-version
================

[](#composer-version)

Bump a package version
----------------------

[](#bump-a-package-version)

Use it in a single project:

```
composer require fuzzyfox/composer-version
```

Or use it everywhere:

```
composer global require fuzzyfox/composer-version
```

### Synopsis

[](#synopsis)

```
composer version [ | major | minor | patch | premajor | preminor | prepatch | devmajor | devminor | devpatch | prerelease [--preid=] | from-git]

composer version # to print current package/composer version
```

### Description

[](#description)

Run this package in a directory to bump the version and write the new data back to `composer.json`.

The `newversion` argument should be a valid [composer version string](https://getcomposer.org/doc/04-schema.md#version), or, one of the following:

- `major` - Bump to the next major version.
- `minor` - Bump to the next minor version.
- `patch` - Bump to the next patch version.
- `premajor [--preid=]` - Bump to the next major version with a prerelease suffix.
- `preminor [--preid=]` - Bump to the next minor version with a prerelease suffix.
- `prepatch [--preid=]` - Bump to the next patch version with a prerelease suffix.
- `devmajor` - Bump to the next major version with a dev suffix.
- `devminor` - Bump to the next minor version with a dev suffix.
- `devpatch` - Bump to the next patch version with a dev suffix.
- `prerelease [--preid=]` - Bump the prerelease suffix number.
- `from-git` - Attempt to get the current version from `git`

If run in a git repo, it will also create a version commit and tag.

If `pre-version`, `pre-version-commit`, or `post-version` are in the composer [`scripts`](https://getcomposer.org/doc/articles/scripts.md) property, they will be executed as part of running `composer version`.

The exact order of execution is as follows:

1. Check to make sure the git working directory is clean before getting started.
2. Run the `pre-version` script. These scripts have access to the old `version`in `composer.json`. Any files you want added to the commit should be explicitly added using `git add`.
3. Bump `version` in `composer.json` as requested.
4. Run the `pre-version-commit` script. These scripts have access to the new `version` in `composer.json`. Again, scripts should explicitly add generated files to the commit using `git add`.
5. Commit and tag.
6. Run the `post-version` script. Use it to clean up the file system or automatically push the commit and/or tag.

### v1.0.0

[](#v100)

This package will be considered `v1.0.0` once it has full feature parity with [`npm version`](https://docs.npmjs.com/cli/version) (though some minor naming tweaks for `composer` compat), and a full set of tests.

A possible additional feature that may be added as part of `v1.0.0` will be the ability to integrate w/ `npm version` to keep both `composer.json` and `package.json`in sync for codebases that desire this.

### License

[](#license)

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at .

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

6

Last Release

2093d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2d49d84d9bd2c13d96b82780962eaf49f0ddf936bd475a1e1f99f4feda78793a?d=identicon)[fuzzyfox](/maintainers/fuzzyfox)

---

Top Contributors

[![fuzzyfox](https://avatars.githubusercontent.com/u/99770?v=4)](https://github.com/fuzzyfox "fuzzyfox (10 commits)")

---

Tags

plugincomposerreleasetagversion

### Embed Badge

![Health badge](/badges/fuzzyfox-composer-version/health.svg)

```
[![Health](https://phpackages.com/badges/fuzzyfox-composer-version/health.svg)](https://phpackages.com/packages/fuzzyfox-composer-version)
```

###  Alternatives

[ergebnis/composer-normalize

Provides a composer plugin for normalizing composer.json.

1.1k37.3M2.1k](/packages/ergebnis-composer-normalize)[pyrech/composer-changelogs

Display changelogs after each composer update

5904.0M25](/packages/pyrech-composer-changelogs)[sllh/composer-versions-check

Checks if packages are up to date to last major versions after update

2352.4M16](/packages/sllh-composer-versions-check)[ffraenz/private-composer-installer

A composer install helper for private packages

2331.7M5](/packages/ffraenz-private-composer-installer)[automattic/jetpack-autoloader

Creates a custom autoloader for a plugin or theme.

525.5M69](/packages/automattic-jetpack-autoloader)[veewee/composer-run-parallel

Run composer tasks in parallel

91748.2k13](/packages/veewee-composer-run-parallel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
