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 today

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

3712d 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.2k31.1k12](/packages/tempest-framework)[phpactor/phpactor

PHP refactoring and intellisense tool for text editors

1.9k16.6k1](/packages/phpactor-phpactor)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

101466.4k45](/packages/friendsoftypo3-content-blocks)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1175.2k](/packages/rcsofttech-audit-trail-bundle)

PHPackages © 2026

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