ballen/git-version-number

A simple class for utilising your project's Git version information as your application version.

2.0.5 2022-12-25 00:37 UTC

This package is auto-updated.

Last update: 2024-10-25 04:40:41 UTC


README

Build Code Coverage Scrutinizer Code Quality Code Climate Latest Stable Version Latest Unstable Version License

A simple library for utilising your project's Git version information as your application version.

Requirements

This library is unit tested against PHP 7.3, 7.4, 8.0, 8.1 and 8.2!

If you need to use an older version of PHP, you should instead install the 2.x version of this library (see below for details).

License

This library is released under the MIT license.

Installation

The recommended way of installing this library is via. Composer; To install using Composer type the following command at the console:

composer require ballen/git-version-number

If you need to use an older version of PHP, version 1.x.x supports PHP 5.6, 7.0, 7.1 and 7.2, you can install this version using Composer with this command instead:

composer require ballen/git-version-number ^1.0

Examples

A set of working examples can be found in the /examples directory.

Tests and coverage

This library is fully unit tested using PHPUnit.

If you wish to run the tests yourself you should run the following:

# Install the Library with the 'development' packages this then includes PHPUnit!
composer install


# Now we run the unit tests (from the root of the project) like so:
./vendor/bin/phpunit

Code coverage can also be run but requires XDebug installed...

./vendor/bin/phpunit --coverage-html ./report

Support

I am happy to provide support via. my personal email address, so if you need a hand drop me an email at: ballen@bobbyallen.me.