PHPackages                             bizkit/versioning-bundle - 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. bizkit/versioning-bundle

ActiveSymfony-bundle

bizkit/versioning-bundle
========================

Symfony bundle which provides a way to version your application using various versioning strategies.

v2.0.0(5mo ago)980.7k↓15.7%3[4 issues](https://github.com/HypeMC/versioning-bundle/issues)MITPHPPHP &gt;=8.1CI passing

Since Jan 11Pushed 5mo ago1 watchersCompare

[ Source](https://github.com/HypeMC/versioning-bundle)[ Packagist](https://packagist.org/packages/bizkit/versioning-bundle)[ Docs](https://github.com/HypeMC/versioning-bundle)[ RSS](/packages/bizkit-versioning-bundle/feed)WikiDiscussions 2.x Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (12)Used By (0)

BizkitVersioningBundle
======================

[](#bizkitversioningbundle)

[![Latest Stable Version](https://camo.githubusercontent.com/d9a88a2a22e11c4abc640af394117e9bc568d3b1da607989c850e02f5a4c34b6/68747470733a2f2f706f7365722e707567782e6f72672f62697a6b69742f76657273696f6e696e672d62756e646c652f762f737461626c65)](https://packagist.org/packages/bizkit/versioning-bundle)[![Build Status](https://github.com/HypeMC/versioning-bundle/workflows/Tests/badge.svg)](https://github.com/HypeMC/versioning-bundle/actions)[![Code Coverage](https://camo.githubusercontent.com/018d7b16b1876627ce0cd566cd2b60ec2deb8c6db2e47cf3d3cea398ec3a3e37/68747470733a2f2f636f6465636f762e696f2f67682f487970654d432f76657273696f6e696e672d62756e646c652f6272616e63682f322e782f67726170682f62616467652e737667)](https://codecov.io/gh/HypeMC/versioning-bundle)[![License](https://camo.githubusercontent.com/6389560b33e5088fff653f338494cd124c186f7d2070efbeb87fd4a59a4a057c/68747470733a2f2f706f7365722e707567782e6f72672f62697a6b69742f76657273696f6e696e672d62756e646c652f6c6963656e7365)](https://packagist.org/packages/bizkit/versioning-bundle)

Symfony bundle which provides a way to version your application using various versioning strategies.

[![Showcase](showcase.gif)](showcase.gif)

Features
--------

[](#features)

- Stores the application's version and release date in a compliant YAML Symfony container configuration file
- Automatically imports the file containing the parameters into Symfony's container
- Supports multiple versioning strategies and the ability to create custom ones
- Includes a console command for incrementing the version using the configured versioning strategy
- Automatically commits the version file and optionally creates a tag if a VCS handler is configured
- Supports Git VCS and allows creating custom VCS handlers

Requirements
------------

[](#requirements)

- [PHP 8.1](http://php.net/releases/8_1_0.php) or higher
- [Symfony 6.4](https://symfony.com/roadmap/6.4) or [Symfony 7.4](https://symfony.com/roadmap/7.4) or higher

Installation
------------

[](#installation)

Require the bundle using [Composer](https://getcomposer.org/):

```
composer require bizkit/versioning-bundle
```

If your project doesn't use [Symfony Flex](https://github.com/symfony/flex), continue with the following steps:

1. Create a configuration file at `config/packages/bizkit_versioning.yaml`. Here's a reference configuration:

    ```
    bizkit_versioning:

        # The prefix added to the version parameters.
        parameter_prefix:     application # Example: my_app

        # The versioning strategy used.
        strategy:             incrementing

        # The name of the file containing the version information.
        filename:             version

        # The path to the file containing the version information.
        filepath:             '%kernel.project_dir%/config'

        # The format used for the version file.
        format:               yaml # One of "yaml"

        # Configuration for the VCS integration,
        # set to false to disable the integration.
        vcs:

            # The handler used for the VCS integration,
            # set to null to disable the integration.
            handler:              git

            # The message to use for the VCS commit.
            commit_message:       'Update application version to %s'

            # The mode for applying tags to version commits:
            # - 'always': automatically add a tag without prompting
            # - 'ask': prompt before tagging when incrementing versions
            # - 'never': do not add a tag
            tagging_mode:         ask # One of "always"; "ask"; "never"

            # The message to use for the VCS tag.
            tag_message:          'Update application version to %s'

            # The name used for the VCS commit information,
            # set to null to use the default VCS configuration.
            name:                 null

            # The email used for the VCS commit information,
            # set to null to use the default VCS configuration.
            email:                null

            # The path to the VCS executable,
            # set to null for autodiscovery.
            path_to_executable:   null
    ```
2. Enable the bundle in `config/bundles.php` by adding it to the array:

    ```
    Bizkit\VersioningBundle\BizkitVersioningBundle::class => ['all' => true],
    ```

Usage
-----

[](#usage)

The bundle creates a compliant [Symfony Dependency Injection Container](https://symfony.com/doc/6.4/components/dependency_injection.html)configuration file with the following parameters:

- `application.version` - the application's version (the format depends on the configured versioning strategy)
- `application.version_hash` - an MD5 digest of the version
- `application.release_date` - an [RFC 3339](https://tools.ietf.org/html/rfc3339)-formatted date on which the version was last incremented

> **NOTE:** The parameter names may vary depending on the `parameter_prefix` configuration option.

It automatically adds the parameters into Symfony's container by registering the file as an [import](https://symfony.com/doc/6.4/service_container/import.html).

To learn more about parameters, see Symfony's [official documentation](https://symfony.com/doc/6.4/configuration.html#configuration-parameters). The following example shows how to use it with [Sentry's](https://sentry.io/) Monolog handler:

```
monolog:
    sentry:
        type: sentry
        dsn: '%sentry_dsn%'
        release: '%application.version%'
```

### Incrementing the version

[](#incrementing-the-version)

To increment the version using the configured strategy, run the following command:

```
bin/console bizkit:versioning:increment
```

If a VCS handler is configured, the command will automatically commit the version file and optionally create a tag with the new version.

Versioning strategies
---------------------

[](#versioning-strategies)

The bundle comes with the following version strategies:

1. `incrementing` - defines the version as an incrementing number
2. `semver` - uses the [Semantic Versioning](https://semver.org/) system

### Custom strategies

[](#custom-strategies)

To implement a custom strategy, create a service that implements the `StrategyInterface` interface.

```
namespace App;

use Bizkit\VersioningBundle\Strategy\StrategyInterface;

class MyStrategy implements StrategyInterface
{
    public function __invoke(StyleInterface $io, ?Version $version = null): Version
    {
        if (null === $version) {
            // return initial version
        }

        // return incremented version
    }
}
```

Use the FQCN of the service in the configuration:

```
bizkit_versioning:
    strategy: App\MyStrategy
```

If you are not using Symfony's [autoconfigure](https://symfony.com/doc/6.4/service_container.html#the-autoconfigure-option)feature or wish to use an alias in the configuration, tag the service with the `bizkit_versioning.strategy` tag:

```
App\MyStrategy:
    tags:
        - { name: 'bizkit_versioning.strategy', alias: 'my_strategy' }

bizkit_versioning:
    strategy: my_strategy
```

VCS handlers
------------

[](#vcs-handlers)

The bundle includes a handler for the [Git](https://git-scm.com/) VCS. To disable the VCS feature, set the `vcs` configuration option to `false`:

```
bizkit_versioning:
    vcs: false
```

### Custom VCS handlers

[](#custom-vcs-handlers)

To implement a custom VCS handler, create a service that implements the `VCSHandlerInterface` interface:

```
namespace App;

use Bizkit\VersioningBundle\VCS\VCSHandlerInterface;

class MyVCSHandler implements VCSHandlerInterface
{
    public function commit(StyleInterface $io, Version $version): void
    {
        // commit the file
    }

    public function tag(StyleInterface $io, Version $version): void
    {
        // create a tag
    }
}
```

Use the FQCN of the service in the configuration:

```
bizkit_versioning:
    vcs:
        handler: App\MyVCSHandler
```

If you are not using Symfony's autoconfigure feature or want to use an alias, tag the service with the `bizkit_versioning.vcs_handler` tag:

```
App\MyVCSHandler:
    tags:
        - { name: 'bizkit_versioning.vcs_handler', alias: 'my_vcs' }

bizkit_versioning:
    vcs:
        handler: my_vcs
```

Versioning
----------

[](#versioning)

This project follows [Semantic Versioning 2.0.0](http://semver.org/).

Reporting Issues
----------------

[](#reporting-issues)

Use the [issue tracker](https://github.com/HypeMC/versioning-bundle/issues) to report any issues you encounter.

License
-------

[](#license)

See the [LICENSE](LICENSE) file for details (MIT).

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance62

Regular maintenance activity

Popularity38

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 98.5% 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 ~163 days

Recently: every ~100 days

Total

12

Last Release

162d ago

Major Versions

v1.2.1 → v2.0.02025-12-07

PHP version history (2 changes)v1.0.0PHP &gt;=7.2

v2.0.0PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/827f7c70741620d8f35b68b14284d7281cb9b23be97fe03a6125c35a8a93a8c4?d=identicon)[HypeMC](/maintainers/HypeMC)

---

Top Contributors

[![HypeMC](https://avatars.githubusercontent.com/u/2445045?v=4)](https://github.com/HypeMC "HypeMC (65 commits)")[![redclov3r](https://avatars.githubusercontent.com/u/1292435?v=4)](https://github.com/redclov3r "redclov3r (1 commits)")

---

Tags

bundlegitphpsemversymfonysymfony-bundleversionversion-control-systemversioningversioning-strategiessemverversioninggitversionvcs

### Embed Badge

![Health badge](/badges/bizkit-versioning-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/bizkit-versioning-bundle/health.svg)](https://phpackages.com/packages/bizkit-versioning-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)

PHPackages © 2026

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