apapsch/describe-version

Composer plugin generating VERSION constant

Installs: 310

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Type:composer-plugin

v0.1.0 2019-11-08 15:58 UTC

This package is auto-updated.

Last update: 2024-04-09 01:49:48 UTC


README

This Composer plugin uses your working directory as Git repository and creates the file version.php defining the constant VERSION with the Git version.

You can use the file how you see fit, i.e. via autoloader.

{
    "autoload": {
        "files": [
            "version.php"
        ]
    }
}

Usage

The version string is available in the constant:

printf("Using %s\n", VERSION);