PHPackages                             cre8-it/vincrease - 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. [DevOps &amp; Deployment](/categories/devops)
4. /
5. cre8-it/vincrease

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

cre8-it/vincrease
=================

A Package to increase a Version-Number .env key mainly for continuous deployment

1.0.1(1y ago)417↓88.2%MITPHPPHP ^8.1

Since Feb 11Pushed 1y ago1 watchersCompare

[ Source](https://github.com/cre8-it/vincrease)[ Packagist](https://packagist.org/packages/cre8-it/vincrease)[ Docs](https://cre8-it.de/)[ RSS](/packages/cre8-it-vincrease/feed)WikiDiscussions main Synced today

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

Version Management Command
==========================

[](#version-management-command)

This package provides a set of Artisan commands for managing version numbers in your Laravel project, particularly for handling the `APP_VERSION` in your `.env` file. It is designed for continuous deployments and follows semantic versioning to keep track of application updates.

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

[](#installation)

1. Install the package via Composer:

```
  composer require cre8-it/vincrease
```

2. (Optional) Publish the configuration file if you need to modify settings:

```
  php artisan vendor:publish --provider="Cre8it\Vincrease\VincreaseServiceProvider"
```

Available Commands
------------------

[](#available-commands)

### `vincrease:init`

[](#vincreaseinit)

Initializes the `APP_VERSION` in your `.env` file if it does not exist. You can provide a custom version with the `--app-version` option.

#### Options:

[](#options)

- `--app-version`: The version number to set (e.g., `0.1.4`). If not provided, defaults to `1.0.0`.

#### Usage:

[](#usage)

```
  php artisan vincrease:init
```

To specify a version:

```
  php artisan vincrease:init --app-version=2.0.0
```

### `vincrease:up`

[](#vincreaseup)

Increases the version number in `APP_VERSION` in your `.env` file. By default, it increments the patch version, but you can specify the level of increment (major, minor, patch).

#### Usage:

[](#usage-1)

By default, increase the patch version:

```
  php artisan vincrease:up
```

```
  APP_VERSION updated to 3.0.1

```

To increase the major version:

```
  php artisan vincrease:up --type=major
```

```
APP_VERSION updated to 4.0.0

```

Integrations
------------

[](#integrations)

Services like Ploi and Forge are just two examples of how it can be integrated, but similar functionality can be achieved with other deployment providers. Refer to their documentation for details on how to pass versioning parameters or modify deployment scripts accordingly.

### Using `vincrease` with Ploi

[](#using-vincrease-with-ploi)

If you're using [Ploi.io](https://ploi.io) for deployment, you can integrate `vincrease` into your deployment script to ensure the `APP_VERSION` is incremented with each deploy, depending on the type of version increase you hint in your latest commit message for example.

Example deployment script:

```
    cd /home/ploi/example.com
    git pull origin main
    composer install --no-interaction --prefer-dist --optimize-autoloader --no-dev

    php artisan vincrease:up --type="{COMMIT_MESSAGE}"

    php artisan config:clear
    php artisan cache:clear
    php artisan migrate --force
```

For [Laravel Forge](https://forge.laravel.com), you can modify your deployment script to include `vincrease`, ensuring that each deployment updates the application version, based on environment variables injected into your deployment script by Forge.

Example deployment script:

```
cd /home/forge/example.com
git pull origin $FORGE_SITE_BRANCH

$FORGE_COMPOSER install --no-interaction --prefer-dist --optimize-autoloader

php artisan vincrease:up --type="$FORGE_DEPLOY_MESSAGE"

php artisan config:clear
php artisan cache:clear
php artisan migrate --force
```

Additionally, Forge allows passing query parameters to deployment triggers. This means you can dynamically control version increments by passing `type=major` or `type=minor` in the trigger URL:

```
https://forge.laravel.com/some-trigger-url?token={your_token}&type=major

```

Forge will then inject a `FORGE_VAR_TYPE` variable that can be used in your deployment script:

```
php artisan vincrease:up --type="$FORGE_VAR_TYPE"
```

**Why use `vincrease`?**

automatically updating an `APP_VERSION` might be useful to:

- Pass the version in response headers to enable cache and asset invalidation on the client-side after each deployment.
- Track and log deployments, making it easier to correlate issues with specific releases.
- Use the version number in API responses for debugging and version control in client applications.
- Ensure version consistency across distributed systems or microservices by syncing version numbers.
- Integrate with monitoring tools to tag logs and error reports with the current application version.

Testing
-------

[](#testing)

Running Tests and Code Quality Tools
------------------------------------

[](#running-tests-and-code-quality-tools)

This project includes a few commands to help with code quality and testing:

- **Refactor**: Runs Rector to refactor the codebase.
- **Lint**: Runs Pint to lint the codebase for style issues.
- **Test**: Runs a set of tests with the following steps:
    - Refactor (with `--dry-run` to check refactorable issues)
    - Run pint to check linting
    - Run type checks with PHPStan at level 7
    - Run unit tests using Pest with code coverage, parallel execution, and a minimum coverage of 100%

### Available Composer Commands:

[](#available-composer-commands)

- **Fix**: Run all refactoring and linting tasks:

```
  composer fix
```

- **Test**: Run all testing tasks (refactor, lint, types, and unit tests):

```
  composer test
```

License
-------

[](#license)

This package is open-source and available under the MIT License.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance40

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

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

Total

2

Last Release

507d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/08d298a2b5b663cfb22689c9cdd608e2715eb1175246d191c855fa21321475aa?d=identicon)[cre8-it](/maintainers/cre8-it)

---

Top Contributors

[![henrik0804](https://avatars.githubusercontent.com/u/110597078?v=4)](https://github.com/henrik0804 "henrik0804 (16 commits)")

---

Tags

laravelenvversioningdeployment

###  Code Quality

TestsPest

Static AnalysisRector

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/cre8-it-vincrease/health.svg)

```
[![Health](https://phpackages.com/badges/cre8-it-vincrease/health.svg)](https://phpackages.com/packages/cre8-it-vincrease)
```

###  Alternatives

[unopim/unopim

UnoPim Laravel PIM

10.5k2.4k](/packages/unopim-unopim)[api-platform/laravel

API Platform support for Laravel

58171.5k14](/packages/api-platform-laravel)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21318.6k3](/packages/ecotone-laravel)[provydon/laravel-scale

Scale your Laravel app. A set of libraries: Laravel Octane (FrankenPHP), Docker, and a stateless web + worker setup for Render, Fly.io, Railway.

201.8k](/packages/provydon-laravel-scale)[webklex/laravel-git-hook

Laravel Git Hook

191.2k](/packages/webklex-laravel-git-hook)

PHPackages © 2026

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