PHPackages                             eznix86/laravel-version - 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. eznix86/laravel-version

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

eznix86/laravel-version
=======================

Semantic app versioning for Laravel with git integration.

v3.1.1(1mo ago)191041[1 PRs](https://github.com/eznix86/laravel-version/pulls)MITPHPPHP ^8.3CI passing

Since Dec 11Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/eznix86/laravel-version)[ Packagist](https://packagist.org/packages/eznix86/laravel-version)[ RSS](/packages/eznix86-laravel-version/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (9)Dependencies (18)Versions (11)Used By (0)

 [![Latest Version on Packagist](https://camo.githubusercontent.com/d5fbe4698cd8bba80538f9262077f84c3e53a906fc4c4e72b8ccf517a34dc1f0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f657a6e697838362f6c61726176656c2d76657273696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/eznix86/laravel-version) [![Total Downloads](https://camo.githubusercontent.com/46ff317b9fa25b0a3893fb12b21de4e7679e026efadf9eca8b51a28dba1aa521/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f657a6e697838362f6c61726176656c2d76657273696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/eznix86/laravel-version)

Laravel Version
===============

[](#laravel-version)

Semantic versioning for Laravel applications with git integration.

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

[](#installation)

```
composer require eznix86/laravel-version
```

Publish the configuration and version file:

```
php artisan vendor:publish --tag=version-config
php artisan vendor:publish --tag=version-json
```

Usage
-----

[](#usage)

### Commands

[](#commands)

```
# Show current version
php artisan version:show

# Bump version
php artisan version:bump patch      # 1.0.0 → 1.0.1
php artisan version:bump minor      # 1.0.0 → 1.1.0
php artisan version:bump major      # 1.0.0 → 2.0.0

# Pre-release versions
php artisan version:bump alpha      # 1.0.0 → 1.0.0-alpha.1
php artisan version:bump beta       # 1.0.0 → 1.0.0-beta.1
php artisan version:bump rc         # 1.0.0 → 1.0.0-rc.1

# With build metadata
php artisan version:bump patch --build=123              # 1.0.0 → 1.0.1+123
php artisan version:bump minor --build=$(git rev-parse --short HEAD)

# Skip git commit/tag
php artisan version:bump patch --no-git

# Set version to specific value
php artisan version:set 2.0.0         # Set version to 2.0.0
php artisan version:set 1.2.3-alpha.1  # Set version with pre-release
php artisan version:set 1.0.0+build.1  # Set version with build metadata
php artisan version:set 2.1.0 --no-git  # Skip git integration

# Set version from latest git tag
php artisan version:set --match-git-tags            # Use latest git tag as version (commits, doesn't create tag)
php artisan version:set --match-git-tags --no-git   # Use latest git tag but skip commit/tag
```

### Helper

[](#helper)

```
// Mirrors the Version Facade

version()->get();              // "1.0.0"
version()->major();            // 1
version()->minor();            // 0
version()->patch();            // 0
version()->preRelease();       // null or "alpha.1"
version()->build();            // null or "123"
version()->isStable();         // true
version()->isPreRelease();     // false

// Comparisons
version()->gt('0.9.0');                  // true
version()->isGreaterThan('0.9.0');       // true (alias of gt)
version()->gte('1.0.0');                 // true
version()->isGreaterThanOrEqualTo('1.0.0'); // true (alias of gte)
version()->lt('2.0.0');                  // true
version()->isLessThan('2.0.0');          // true (alias of lt)
version()->lte('1.0.0');                 // true
version()->isLessThanOrEqualTo('1.0.0'); // true (alias of lte)
version()->eq('1.0.0');                  // true
version()->isCompatibleWith('1.0.0');    // true (alias of eq)
version()->neq('2.0.0');                 // true
version()->isNotEqualTo('2.0.0');        // true (alias of neq)
```

### Blade

[](#blade)

```
@version
```

The `@version` directive automatically includes the configured prefix.

### Facade

[](#facade)

```
use Eznix86\Version\Facades\Version;

Version::get();
Version::incrementMinor();
```

Configuration
-------------

[](#configuration)

```
// config/version.php
return [

    /*
    |--------------------------------------------------------------------------
    | Version Prefix
    |--------------------------------------------------------------------------
    |
    | This value is prepended to the version string when using the @version
    | Blade directive. Set to an empty string to disable the prefix.
    |
    */

    'prefix' => 'v',

    /*
    |--------------------------------------------------------------------------
    | Git Integration
    |--------------------------------------------------------------------------
    |
    | When enabled, version bumps will automatically create a git commit and
    | tag. You can customize the commit message and tag format using the
    | {version} placeholder which will be replaced with the new version.
    |
    */

    'git' => [
        'enabled' => true,
        'commit_message' => 'Bump version to {version}',
        'tag_format' => 'v{version}',
    ],

];
```

Artisan About
-------------

[](#artisan-about)

The package automatically registers the version in Laravel's `about` command:

```
php artisan about
```

This will display your application version in the Application section.

Production Protection
---------------------

[](#production-protection)

To prevent accidental version changes in production, add this to your `AppServiceProvider`:

```
use Eznix86\Version\Version;

public function boot(): void
{
    Version::prohibitCommands($this->app->isProduction());
}
```

Or prohibit commands individually:

```
use Eznix86\Version\Commands\VersionBumpCommand;
use Eznix86\Version\Commands\VersionSetCommand;

public function boot(): void
{
    VersionBumpCommand::prohibit($this->app->isProduction());
    VersionSetCommand::prohibit($this->app->isProduction());
}
```

License
-------

[](#license)

MIT

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance90

Actively maintained with recent releases

Popularity22

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 93.3% 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 ~12 days

Recently: every ~19 days

Total

9

Last Release

53d ago

Major Versions

v1.1.0 → v2.0.02026-01-04

v2.1.2 → v3.0.02026-03-18

### Community

Maintainers

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

---

Top Contributors

[![eznix86](https://avatars.githubusercontent.com/u/26553194?v=4)](https://github.com/eznix86 "eznix86 (14 commits)")[![tobya](https://avatars.githubusercontent.com/u/325502?v=4)](https://github.com/tobya "tobya (1 commits)")

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/eznix86-laravel-version/health.svg)

```
[![Health](https://phpackages.com/badges/eznix86-laravel-version/health.svg)](https://phpackages.com/packages/eznix86-laravel-version)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M158](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M213](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M862](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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