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

ActiveSymfony-bundle

svc/versioning-bundle
=====================

Private package to handle version numbers and deploys

8.2.0(4mo ago)1355MITPHPPHP ^8.4CI passing

Since Feb 24Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/Sven-Ve/svc-versioning-bundle)[ Packagist](https://packagist.org/packages/svc/versioning-bundle)[ RSS](/packages/svc-versioning-bundle/feed)WikiDiscussions main Synced 6d ago

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

SvcVersioningBundle
===================

[](#svcversioningbundle)

[![CI](https://github.com/Sven-Ve/svc-versioning-bundle/actions/workflows/php.yml/badge.svg)](https://github.com/Sven-Ve/svc-versioning-bundle/actions/workflows/php.yml)[![Last commit](https://camo.githubusercontent.com/c4e47c92fdf715cefa51896ce2550fcadb2854b33ed3945474701c297818e771/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f5376656e2d56652f7376632d76657273696f6e696e672d62756e646c65)](https://camo.githubusercontent.com/c4e47c92fdf715cefa51896ce2550fcadb2854b33ed3945474701c297818e771/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f5376656e2d56652f7376632d76657273696f6e696e672d62756e646c65)[![PHP Version](https://camo.githubusercontent.com/0751c5c7ed417028d6909f393af80b98d84b224db16e8307c3988e7eefc8ecdb/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344382e342d626c7565)](https://php.net/)[![Symfony](https://camo.githubusercontent.com/90276a254867071c6bd3bef128b1375788992e820f2b5e49ea66bdc333ffa466/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f73796d666f6e792d372e34253242253230253743253230382d677265656e)](https://symfony.com/)[![License](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE)

A Symfony bundle that provides **automated semantic versioning**, **git operations**, and **deployment capabilities** for your applications. Streamline your release process with a single command.

> **⚠️ Breaking Changes in v8.0.0**
>
> - **Symfony 7.4+ required**: The bundle now uses Symfony's invokable command pattern introduced in v7.3/7.4
> - If you need Symfony 6.x or 7.0-7.3 support, use v7.x of this bundle
> - See [BREAKING\_CHANGES.md](BREAKING_CHANGES.md) for migration instructions

🚀 Quick Start
-------------

[](#-quick-start)

```
# Install the bundle
composer require svc/versioning-bundle

# Create your first version (prompts for commit message)
bin/console svc:versioning:new --init

# Or provide commit message directly
bin/console svc:versioning:new "Initial version" --init

# Increment versions easily
bin/console svc:versioning:new "Bug fixes" --patch  # 1.0.0 → 1.0.1
bin/console svc:versioning:new "New features" --minor  # 1.0.1 → 1.1.0
bin/console svc:versioning:new "Breaking changes" --major  # 1.1.0 → 2.0.0

# Without message argument, you'll be prompted interactively
bin/console svc:versioning:new --patch
# → "Please enter the commit message:"
```

✨ Features
----------

[](#-features)

- **🏷️ Semantic Versioning**: Automatic major/minor/patch version increments
- **📝 File Generation**: Updates `.version`, `CHANGELOG.md`, and Twig templates
- **🔧 Git Integration**: Automatic commits, pushes, and tag creation
- **🚀 Multiple Deployment Options**:
    - EasyCorp EasyDeploy Bundle integration
    - Custom deployment commands
    - Ansible automation
    - Docker deployments
- **🧪 Pre-deployment Validation**: Run tests, linting, or custom commands before release
- **🔒 Security Scanning**: Built-in composer audit for vulnerability detection (enabled by default)
- **🔄 CI/CD Ready**: Perfect for automated pipelines
- **💎 Modern PHP**: Built with PHP 8.2+ features (readonly properties, match expressions)
- **🛡️ Type Safe**: Immutable value objects with PHPStan level 6 compliance
- **⚡ Invokable Commands**: Uses Symfony 7.4's modern invokable command pattern
- **💬 Interactive Prompts**: Asks for commit message if not provided (v8.0.0+)

🎯 How It Works
--------------

[](#-how-it-works)

When you run `bin/console svc:versioning:new`, the bundle:

1. **Pre-validation** - Runs optional pre-commands (tests, linting)
2. **Security Check** - Scans dependencies for vulnerabilities with composer audit (enabled by default)
3. **Cache Check** - Optionally verifies production cache can be cleared without errors
4. **Increments** - Updates version number using semantic versioning
5. **Updates Files** - Modifies `.version`, `CHANGELOG.md`, and Twig templates
6. **Git Operations** - Commits changes, pushes, and creates tags
7. **Deploys** - Triggers deployment via your chosen method

📖 Documentation
---------------

[](#-documentation)

### Getting Started

[](#getting-started)

- **[Installation](docs/installation.md)** - Setup and bundle registration
- **[Configuration](docs/configuration.md)** - Detailed configuration options
- **[Usage](docs/usage.md)** - Basic usage and commands

### Advanced Topics

[](#advanced-topics)

- **[Examples &amp; Workflows](docs/examples.md)** - Real-world usage scenarios
- **[Deployment Guide](docs/deployment.md)** - All deployment options explained
- **[Troubleshooting](docs/troubleshooting.md)** - Common issues and solutions

### Development

[](#development)

- **[Contributing](CONTRIBUTING.md)** - Development guidelines and setup
- **[Breaking Changes](BREAKING_CHANGES.md)** - Version migration guides

🏗️ Requirements
---------------

[](#️-requirements)

- **PHP**: 8.2+ (for readonly properties and modern features)
- **Symfony**: 7.4+ or 8.x (for invokable command pattern)
- **Git**: For version control operations (optional)

> **Note**: For Symfony 6.x or 7.0-7.3 support, use v7.x of this bundle

📦 Installation
--------------

[](#-installation)

```
composer require svc/versioning-bundle
```

For non-Flex projects, register the bundle manually:

```
// config/bundles.php
return [
    // ...
    Svc\VersioningBundle\SvcVersioningBundle::class => ['all' => true],
];
```

⚙️ Basic Configuration
----------------------

[](#️-basic-configuration)

```
# config/packages/svc_versioning.yaml
svc_versioning:
    run_git: true                    # Enable git operations
    run_deploy: true                 # Enable deployment
    pre_command: "vendor/bin/phpunit" # Run tests before versioning
    run_composer_audit: true         # Check for security vulnerabilities (default: true)
    check_cache_clear: false         # Check if production cache clear works
    cleanup_cache_dir: false         # Delete var/cache/prod after check
```

🚦 Usage Examples
----------------

[](#-usage-examples)

```
# Initialize versioning (creates version 0.0.1)
bin/console svc:versioning:new "Initial version" --init

# Patch release (bug fixes)
bin/console svc:versioning:new "Fix critical bug" --patch

# Minor release (new features, backward compatible)
bin/console svc:versioning:new "Add user management" --minor

# Major release (breaking changes)
bin/console svc:versioning:new "New API version" --major

# Interactive mode - prompts for commit message
bin/console svc:versioning:new --patch
# → "Please enter the commit message:" [waits for input]

# Quick patch without specifying type (defaults to patch)
bin/console svc:versioning:new "Quick bugfix"

# Override security audit check (emergency use only)
bin/console svc:versioning:new "Hotfix" --patch --ignore-audit
```

🔧 Deployment Options
--------------------

[](#-deployment-options)

### EasyDeploy (Default)

[](#easydeploy-default)

```
composer require easycorp/easy-deploy-bundle --dev
```

### Custom Commands

[](#custom-commands)

```
svc_versioning:
    deploy_command: "./deploy.sh production"
```

### Ansible Automation

[](#ansible-automation)

```
svc_versioning:
    ansible_deploy: true
    ansible_inventory: "inventory.yml"
    ansible_playbook: "deploy.yml"
```

🎨 Generated Files
-----------------

[](#-generated-files)

The bundle automatically creates and maintains:

- **`.version`** - Current version number
- **`CHANGELOG.md`** - Version history with timestamps
- **`templates/_version.html.twig`** - Twig template for displaying version

```
{# Example generated template #}
Version: 1.2.3
```

🤝 Contributing
--------------

[](#-contributing)

Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.

📄 License
---------

[](#-license)

This bundle is released under the MIT License. See [LICENSE](LICENSE) for details.

🙏 Credits
---------

[](#-credits)

Created and maintained by [Sven Vetter](https://github.com/Sven-Ve).

###  Health Score

51

—

FairBetter than 96% of packages

Maintenance82

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

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

Recently: every ~11 days

Total

35

Last Release

137d ago

Major Versions

3.0.1 → 4.0.02022-11-24

4.0.1 → 5.0.02023-12-17

5.4.0 → 6.0.02025-10-31

6.1.0 → 7.0.02025-11-16

7.1.0 → 8.0.02025-12-06

PHP version history (8 changes)v0.0.1PHP ^7.1.3

v1.0.1PHP ^7.3.0 | ^8.0.0

v1.4.1PHP ^7.3.0 | ^8

3.0.0PHP ^8.0.2

4.0.0PHP ^8.1.0

5.0.0PHP ^8.2

5.0.1PHP ^7.3 || ^8

8.0.0PHP ^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/32cf6fdc8247699d8d6a80d5c9c11215031520c0aa2ae7ba52e81536db860a84?d=identicon)[iSven](/maintainers/iSven)

---

Top Contributors

[![Sven-Ve](https://avatars.githubusercontent.com/u/79282618?v=4)](https://github.com/Sven-Ve "Sven-Ve (62 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[sylius/sylius

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

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

A PHP implementation of a SAML 2.0 service provider and identity provider.

1.1k12.4M193](/packages/simplesamlphp-simplesamlphp)[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)

PHPackages © 2026

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