PHPackages                             raketman/service-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. raketman/service-versioning-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

raketman/service-versioning-bundle
==================================

Easy versioning your services

1.0.1(5y ago)02.4kMITPHPPHP &gt;=5.6.5

Since Jul 19Pushed 5y agoCompare

[ Source](https://github.com/raketman/service-versioning-bundle)[ Packagist](https://packagist.org/packages/raketman/service-versioning-bundle)[ RSS](/packages/raketman-service-versioning-bundle/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (3)Used By (0)

\##Versioning Symfony Services

```
composer require raketman/service-versioning-bundle

```

\####Usage :

```
services:

  #Specify the tag 'raketman.version.factory' - now this service will have versions
  #resolver - service that will determine the version

  app.validation.test:
    class: App\Validation\VInterface
    tags:
      - {name: 'raketman.version.factory', resolver: 'app.version.resolver'}
  # OR if yuo have autowire

  App\Validation\VInterface
    tags:
      - {name: 'raketman.version.factory', resolver: 'app.version.resolver'}

  #The version is indicated through tags that correspond to the name of the service we want to version
  #version - value of version

  app.validation.test_v1:
    class: App\Validation\V1
    tags:
      - {name: 'app.validation.test', version: 1 }
      - {name: 'app.validation.test', version: 3 }

  app.validation.test_v2:
    class: App\Validation\V2
    tags:
      - {name: 'app.validation.test', version: 2 }
  #OR if yuo have autowire

  app.validation.test_v1:
    class: App\Validation\V1
    tags:
      - {name: 'App\Validation\VInterface', version: 1 }
      - {name: 'App\Validation\VInterface', version: 3 }

  app.validation.test_v2:
    class: App\Validation\V2
    tags:
      - {name: 'App\Validation\VInterface', version: 2 }

  # Version resolver

  app.version.resolver:
    class: App\Resolver\Version
    arguments:
        - '@request_stack'

```

Now you have the service "app.validation.test", upon receipt of which, depending on which version it will return "app.version.resolver", if 1 then "app.validation.test\_v1" or if 2 then "app.validation.test\_v2 will return

\#####For example, the implementation of "app.version.resolver" is as follows:

```
 namespace App\Resolver;

 use Raketman\Bundle\ServiceVersioningBundle\Resolver\VersionResolverInterface;
 use Symfony\Component\HttpFoundation\RequestStack;

 class Version implements VersionResolverInterface
 {
     /** @var RequestStack  */
     private  $request;

     public function __construct(RequestStack $request)
     {
         $this->request = $request;
     }

     public function getVersion()
     {
         return $this->request->getMasterRequest()->get('version') ? : 1;
     }
 }

```

Now we can use "app.validation.test", and get different versions depending on $ \_GET \['version'\]

```
 $validation = $this->get('app.validation.test');

 if $_GET['version'] === 1, then get_class($validation) - App\Validation\V1 // app.validation.test_v1
 if $_GET['version'] === 2, then get_class($validation) - App\Validation\V2 // app.validation.test_v2
 if $_GET['version'] === 3, then get_class($validation) - App\Validation\V1 // app.validation.test_v1

 OR

 /**
 * @Route("/some-method")
 */
 public function test(App\Validation\VInterface $validation)
 {
     //if $_GET['version'] === 1, then get_class($validation) - App\Validation\V1 // app.validation.test_v1
     //if $_GET['version'] === 2, then get_class($validation) - App\Validation\V2 // app.validation.test_v2
     //if $_GET['version'] === 3, then get_class($validation) - App\Validation\V1 // app.validation.test_v1
 }

```

The implementation of resolver can be any, for example, based on the current user, which will allow for various users on the go to issue the necessary service implementations

If you use versioning in daemons, then do not forget to set the service mode

```
  shared: false

```

otherwise you will always be given the same instance after the first call

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity55

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

Total

2

Last Release

2069d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/aa2e4187dc99c83022433e1bb30dbf65cbbd8e14e55aed2402d19af0c8db83bf?d=identicon)[raketman](/maintainers/raketman)

---

Top Contributors

[![raketman](https://avatars.githubusercontent.com/u/2410431?v=4)](https://github.com/raketman "raketman (14 commits)")

---

Tags

serviceversioningversion

### Embed Badge

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

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

###  Alternatives

[pragmarx/version

Take control over your Laravel app version

5921.2M2](/packages/pragmarx-version)[nikolaposa/version

Value Object that represents a SemVer-compliant version number.

1406.4M16](/packages/nikolaposa-version)[shivas/versioning-bundle

Symfony application versioning, simple console command to manage version (with providers e.g. git tag) of your application using Semantic Versioning 2.0.0 recommendations

1121.2M1](/packages/shivas-versioning-bundle)[wolfcast/browser-detection

The Wolfcast BrowserDetection PHP class facilitates the identification of the user's environment such as Web browser, version, platform family, platform version or if it's a mobile device or not.

1391.0M7](/packages/wolfcast-browser-detection)[naneau/semver

A decent, standards-compliant, Semantic Versioning (SemVer) parser and library

72496.2k13](/packages/naneau-semver)

PHPackages © 2026

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