PHPackages                             bitboss-hub/git-version-output - 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. bitboss-hub/git-version-output

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

bitboss-hub/git-version-output
==============================

Nothing for now

v0.2.5(2y ago)0214MITPHP

Since Dec 21Pushed 2y ago2 watchersCompare

[ Source](https://github.com/bitboss-hub/laravel-git-version-output)[ Packagist](https://packagist.org/packages/bitboss-hub/git-version-output)[ RSS](/packages/bitboss-hub-git-version-output/feed)WikiDiscussions main Synced yesterday

READMEChangelog (1)DependenciesVersions (9)Used By (0)

A git version getter
====================

[](#a-git-version-getter)

A helper class to get the current git version of the project.

Expects either a `version` file to exist in the `base_path()` of your project containing a version string, or the `git` binary to be available.

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

[](#installation)

Require it in your Laravel/Lumen project:

```
composer require bitboss-hub/laravel-git-version-output

```

### Optional packages

[](#optional-packages)

This module uses [Symfony's Process component](https://github.com/symfony/process) if available, or falls back to `shell_exec` otherwise. So if your deployment environment has `shell_exec` disabled, you can work around this by installing `symfony/process`.

Use
---

[](#use)

You can get the git version array with

```
\BitBossHub\LaravelGitVersionOutput\GitVersionOutputHelper::getInformations()

```

It will output an array

```
  "app_name" => "Laravel"
  "tag" => "v1.0"
  "commit" => "g796af4b6"
  "since_tag" => "5009"
  "build_date" => "2023-12-21 10:26:47"

```

The app's name is taken from `Config::get('app.name', 'app')`, so you can configure it in your `config/app.php` file or leave it as the default of `app`.

### Recommended usage pattern

[](#recommended-usage-pattern)

Ensure your git tags are pushed to your servers so that the versions are described properly.

During development and possibly in staging environments allow the version to be determined automatically (this is done via `git describe`).

### How it works

[](#how-it-works)

The first time this package is called, it creates a `version` file to your project directory.

When this `version` file exists the package will use its contents.

Ensure to add it to the `.gitignore` file so your working tree stays clean and you don't accidentally commit it.

As part of your production deployment procedure remember to delete this file every time a new deploy is executed.

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 80% 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 ~25 days

Recently: every ~38 days

Total

7

Last Release

773d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4792196?v=4)[Riccardo Barbotti](/maintainers/snake03)[@snake03](https://github.com/snake03)

---

Top Contributors

[![snake03](https://avatars.githubusercontent.com/u/4792196?v=4)](https://github.com/snake03 "snake03 (8 commits)")[![otrigg](https://avatars.githubusercontent.com/u/18140685?v=4)](https://github.com/otrigg "otrigg (2 commits)")

### Embed Badge

![Health badge](/badges/bitboss-hub-git-version-output/health.svg)

```
[![Health](https://phpackages.com/badges/bitboss-hub-git-version-output/health.svg)](https://phpackages.com/packages/bitboss-hub-git-version-output)
```

PHPackages © 2026

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