PHPackages                             oliveris/git-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. oliveris/git-version

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

oliveris/git-version
====================

Gets the git version and returns it as a string.

v1.0.1(7y ago)1637MITPHP

Since Aug 1Pushed 7y ago1 watchersCompare

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

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Git Version
===========

[](#git-version)

Helpers around Git Tag versions these include getting the latest version and getting the date of the version.

### Usage

[](#usage)

Pull in the composer package by running the command below:

```
composer require oliveris/git-version

```

Import the namspace into the class (autoloading)

```
use GitVersion\GitVersion

```

Examples
--------

[](#examples)

### To get the latest git version string

[](#to-get-the-latest-git-version-string)

Below is an example that returns a string of the git version.

```
GitVersion::getLatestVersion()

```

### To get the date a git version was created at

[](#to-get-the-date-a-git-version-was-created-at)

Below is an example that returns a date string the passed version tag was created at. The optional second parameter is a date format you need it to return as.

```
// Get the version you require
$git_version = GitVersion::getLatestVersion()

// Get the date for that version
GitVersion::getVersionDate($git_version, 'd-m-Y')

```

Tests
-----

[](#tests)

To run the tests set up the package in an environment you can run php and open tests/index.php

Built With
----------

[](#built-with)

- PHP

Versioning
----------

[](#versioning)

We use [Semantic Versioning 1.0.0](https://semver.org/spec/v1.0.0.html), for example v1.0.0.

Authors
-------

[](#authors)

- Sam Oliveri - Software Developer

### License

[](#license)

GIT Version is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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

2842d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20270046?v=4)[Sam](/maintainers/oliveris)[@oliveris](https://github.com/oliveris)

---

Top Contributors

[![oliveris](https://avatars.githubusercontent.com/u/20270046?v=4)](https://github.com/oliveris "oliveris (6 commits)")

---

Tags

gitversiongit version

### Embed Badge

![Health badge](/badges/oliveris-git-version/health.svg)

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

###  Alternatives

[czproject/git-php

Library for work with Git repository in PHP.

5544.9M81](/packages/czproject-git-php)[pragmarx/version

Take control over your Laravel app version

5921.2M2](/packages/pragmarx-version)[cypresslab/gitelephant

An abstraction layer for git written in PHP

6131.0M23](/packages/cypresslab-gitelephant)[nikolaposa/version

Value Object that represents a SemVer-compliant version number.

1406.4M16](/packages/nikolaposa-version)[marcocesarato/php-conventional-changelog

Generate changelogs and release notes from a project's commit messages and metadata and automate versioning with semver.org and conventionalcommits.org

2511.3M109](/packages/marcocesarato-php-conventional-changelog)[ramsey/conventional-commits

A PHP library for creating and validating commit messages according to the Conventional Commits specification. Includes a CaptainHook action!

1931.2M122](/packages/ramsey-conventional-commits)

PHPackages © 2026

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