PHPackages                             sado729/project-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. sado729/project-version

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

sado729/project-version
=======================

Laravel Project Version Automatically Increase

1.0.7(1mo ago)348MITPHPPHP ^8.0CI passing

Since Jul 4Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/sado729/project-version)[ Packagist](https://packagist.org/packages/sado729/project-version)[ RSS](/packages/sado729-project-version/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (8)Dependencies (10)Versions (11)Used By (0)

Project Version
---------------

[](#project-version)

Laravel paketi layihənizin versiyasını **avtomatik** olaraq git aktivliyinə əsasən artırır. Versiya `"major.minor.patch"` formatındadır:

- **patch** — hər dəyişdirilən fayl üçün +1 (ignor edilməyənlər arasından)
- **minor** — `module_paths` konfiqurasiyasındakı qovluqlara əlavə olunan hər yeni modul üçün +1, patch sıfırlanır
- **major** — `version:release major` komandası ilə artırılır

Versiya `informations` cədvəlində saxlanılır, tarixçə isə `version_histories` cədvəlində.

---

Quraşdırma
----------

[](#quraşdırma)

```
composer require sado729/project-version
php artisan vendor:publish --provider="Sado729\ProjectVersion\ProjectVersionServiceProvider"
php artisan migrate
```

`config/project-version.php`-ni öz layihənizə uyğunlaşdırın (ignor paternləri, modul yolları, patch overflow, və s.).

---

Avtomatik versiyalama (tövsiyə olunan)
--------------------------------------

[](#avtomatik-versiyalama-tövsiyə-olunan)

```
php artisan version:install-hooks
```

Bu komanda `.git/hooks/post-commit` və `post-merge` skriptlərini yazır. Mövcud hook-larla **toqquşmur** — özünə aid bloku marker arasında əlavə edir, başqa məzmunu pozmur. Yenidən çağırılsa, mövcud bloku yeniləyir (idempotent).

Bundan sonra:

- `git commit` → versiya son commit-in diff-inə görə yenilənir
- `git pull` / `git merge` → versiya `ORIG_HEAD..HEAD` diapazonuna görə yenilənir

Hook-u silmək üçün:

```
php artisan version:install-hooks --uninstall
```

> `.git/hooks/` versiya nəzarətində saxlanılmadığından hər klondan sonra bir dəfə quraşdırılmalıdır.

---

Əl ilə komandalar
-----------------

[](#əl-ilə-komandalar)

```
# İki ref arası diff (custom range)
php artisan version:bump --from=HEAD~1 --to=HEAD

# Working tree (uncommitted + untracked)
php artisan version:bump --working-tree

# Manual release
php artisan version:release patch
php artisan version:release minor
php artisan version:release major

# Köhnə davranış: git pull + bump
php artisan git:pull
```

---

View-da istifadə
----------------

[](#view-da-istifadə)

```
v@projectVersion
```

Yaxud helper:

```
echo project_version(); // "1.2.7"
```

---

Konfiqurasiya
-------------

[](#konfiqurasiya)

`config/project-version.php`:

AçarTəyinat`ignore_patterns`Versiyaya təsir etməyən fayllar (glob, `fnmatch` ilə müqayisə). Default: `*.md`, lock fayllar, `vendor/*`, `node_modules/*`, `storage/*`, `tests/*`, və s.`module_paths`"Yeni modul" sayılan yollar. Default: `app/*`.`patch_rollover_threshold`Patch bu rəqəmə çatanda minor-a roll over edir. Default: `null` (söndürülmüş). Məs. `100` → `1.0.847` əvəzinə `1.8.47`.`history_enabled``version_histories` cədvəlinə hər bump-da yazsın? Default: `true`.`git_repository_name`, `git_branch_name``git:pull` komandası üçün.---

Event
-----

[](#event)

```
use Sado729\ProjectVersion\Events\GitPullEvent;

Event::listen(GitPullEvent::class, function (GitPullEvent $event) {
    logger()->info("Yeni versiya: {$event->version}");
});
```

---

Middleware
----------

[](#middleware)

```
Route::middleware('project-version')->group(fn () => /* ... */);
```

---

CI/CD
-----

[](#cicd)

Local hook əvəzinə CI-də versiyalama üçün hazır nümunə: [`examples/github-actions-version-bump.yml`](examples/github-actions-version-bump.yml).

---

Testlər
-------

[](#testlər)

```
composer install
vendor/bin/phpunit
```

---

License
-------

[](#license)

MIT — [License File](license.md)

---

More from me
------------

[](#more-from-me)

- [MrSadiq.info](https://mrsadiq.info)

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance90

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

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

Recently: every ~260 days

Total

8

Last Release

48d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/22997209?v=4)[Sadiq Məmmədov](/maintainers/sado729)[@sado729](https://github.com/sado729)

---

Top Contributors

[![sado729](https://avatars.githubusercontent.com/u/22997209?v=4)](https://github.com/sado729 "sado729 (23 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/sado729-project-version/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M132](/packages/laravel-pulse)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M131](/packages/roots-acorn)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45444.2k1](/packages/pressbooks-pressbooks)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.6k29.9M147](/packages/laravel-cashier)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)

PHPackages © 2026

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