PHPackages                             juliendufresne/composer-version-handler - 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. juliendufresne/composer-version-handler

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

juliendufresne/composer-version-handler
=======================================

Composer script to automates the process of updating an application version number

v1.0.1(10y ago)05.6kMITPHPPHP &gt;=7.0

Since Apr 30Pushed 10y ago1 watchersCompare

[ Source](https://github.com/juliendufresne/VersionHandler)[ Packagist](https://packagist.org/packages/juliendufresne/composer-version-handler)[ RSS](/packages/juliendufresne-composer-version-handler/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (2)Dependencies (3)Versions (3)Used By (0)

Automating an application version number with Composer
======================================================

[](#automating-an-application-version-number-with-composer)

Usage
-----

[](#usage)

Add the following in your root composer.json file:

```
{
    "require": {
        "juliendufresne/composer-version-handler": "^1.0"
    },
    "scripts": {
        "post-install-cmd": [
            "JulienDufresne\\VersionHandler\\ScriptHandler::updateVersion"
        ],
        "post-update-cmd": [
            "JulienDufresne\\VersionHandler\\ScriptHandler::updateVersion"
        ]
    },
    "extra": {
        "juliendufresne-version": {
            "file": "app/config/parameters.yml",
            "parameter-key": "parameters.app_version",
            "strategies": ["git", "incremental"]
        }
    }
}
```

The `parameters.app_version` will then be updated according to the first strategy able to deliver a version number.

Strategies
----------

[](#strategies)

### Git

[](#git)

If the current revision corresponds to a git tag, the git strategy will use this tag as a version.

### Incremental

[](#incremental)

The incremental strategy increment the version by 1. This strategy requires the version to end with a number. If there is no current version, the next version is set to 1.

Ex: if the current version is `v10`, then this strategy will set the new version to `v12`

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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 ~1 days

Total

2

Last Release

3757d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5cc2f661073d68100db53e02e0892a69076f0b44bc0ced487b043c6aff28ad0c?d=identicon)[JulienDufresne](/maintainers/JulienDufresne)

---

Top Contributors

[![juliendufresne](https://avatars.githubusercontent.com/u/1397529?v=4)](https://github.com/juliendufresne "juliendufresne (3 commits)")

### Embed Badge

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

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

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.3k37.6k20](/packages/tempest-framework)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19467.3M1.9k](/packages/drupal-core)[phpactor/phpactor

PHP refactoring and intellisense tool for text editors

1.9k17.9k1](/packages/phpactor-phpactor)[kimai/kimai

Kimai - Time Tracking

4.8k9.4k1](/packages/kimai-kimai)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6943.5M448](/packages/drupal-core-recommended)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.8M668](/packages/shopware-core)

PHPackages © 2026

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