PHPackages                             eiriksm/gitinfo - 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. eiriksm/gitinfo

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

eiriksm/gitinfo
===============

Get some git info about your application

4.1.2(1y ago)3566.8k↓42%42MITPHP

Since Mar 17Pushed 1y ago2 watchersCompare

[ Source](https://github.com/eiriksm/php-app-git-version)[ Packagist](https://packagist.org/packages/eiriksm/gitinfo)[ RSS](/packages/eiriksm-gitinfo/feed)WikiDiscussions main Synced 3d ago

READMEChangelog (8)Dependencies (3)Versions (13)Used By (2)

eiriksm/gitinfo
===============

[](#eiriksmgitinfo)

[![Packagist](https://camo.githubusercontent.com/040ead0631a088d6f1d1f06b150563a53a74a9349543b7f8d9bdb08a8d8aae4e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656972696b736d2f676974696e666f2e7376673f6d61784167653d33363030)](https://packagist.org/packages/eiriksm/gitinfo)[![Packagist](https://camo.githubusercontent.com/b15fca25f273debdca3aa8aa98e94256b1c45f9d0ba5d2de7d99e0e7b16137b3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656972696b736d2f676974696e666f2e7376673f6d61784167653d33363030)](https://packagist.org/packages/eiriksm/gitinfo)[![Coverage Status](https://camo.githubusercontent.com/b626b36c028be100c040d877ee8635e5d7b86f410defef15012307a71533ca16/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f656972696b736d2f7068702d6170702d6769742d76657273696f6e2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/eiriksm/php-app-git-version?branch=master)[![Build Status](https://camo.githubusercontent.com/9f401256a396d4dff63e74f867753c9d8b48df0acc3c29bfa5555016e2f426c0/68747470733a2f2f7472617669732d63692e6f72672f656972696b736d2f7068702d6170702d6769742d76657273696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/eiriksm/php-app-git-version)[![Violinist enabled](https://camo.githubusercontent.com/d9732258721280d90f7f95b5f928ea5c63eb6d3d740151d62e4a9ad1660d95d3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76696f6c696e6973742d656e61626c65642d627269676874677265656e2e737667)](https://violinist.io)

A package to get git info from your application. You can use this to display application information about your app, which in turn is useful for generating bug reports or user feedback.

You can also use it as an indication to your users of your last update of your application.

This is what powers the version string on [Violinist.io](https://violinist.io/) where you can get free, automated composer updates for life!

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

[](#installation)

Install with composer:

```
composer require eiriksm/gitinfo
```

Usage
-----

[](#usage)

You use this based on your preferred method of output.

```
use eiriksm\GitInfo\GitInfo;
$info = new GitInfo();
$hash = $info->getShortHash(); // Example output: f09037f
$date = $info->getDate(); // Example output (last commit date): 2020-05-31 09:05:40
$version = $info->getVersion(); // Example output: 1.1.1-2-gf09037f, or if on a clean tag: 1.1.1
$app_version = $info->getApplicationVersionString(); // v.1.1.1-2-gf09037f.f09037f (2020-05-31 09:05:40)
```

Licence
-------

[](#licence)

MIT

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity40

Moderate usage in the ecosystem

Community19

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 88.2% 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 ~277 days

Recently: every ~250 days

Total

11

Last Release

626d ago

Major Versions

1.1.1 → 2.0.02020-05-31

2.0.1 → 3.0.02021-09-03

3.0.0 → 4.0.02022-01-16

### Community

Maintainers

![](https://www.gravatar.com/avatar/012259317b9e5a3b6cc2b03681d852940e11ac05f37bfbda7360d6524b1c9085?d=identicon)[eiriksm](/maintainers/eiriksm)

---

Top Contributors

[![eiriksm](https://avatars.githubusercontent.com/u/865153?v=4)](https://github.com/eiriksm "eiriksm (30 commits)")[![violinist-bot](https://avatars.githubusercontent.com/u/27495990?v=4)](https://github.com/violinist-bot "violinist-bot (2 commits)")[![esolitos](https://avatars.githubusercontent.com/u/401819?v=4)](https://github.com/esolitos "esolitos (1 commits)")[![zaporylie](https://avatars.githubusercontent.com/u/1690685?v=4)](https://github.com/zaporylie "zaporylie (1 commits)")

---

Tags

composergitpackagistphp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/eiriksm-gitinfo/health.svg)

```
[![Health](https://phpackages.com/badges/eiriksm-gitinfo/health.svg)](https://phpackages.com/packages/eiriksm-gitinfo)
```

###  Alternatives

[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k251.2M25.2k](/packages/friendsofphp-php-cs-fixer)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[phpactor/phpactor

PHP refactoring and intellisense tool for text editors

1.9k17.1k1](/packages/phpactor-phpactor)

PHPackages © 2026

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