2017 © Pedro Peláez
 

library silex-version-serviceprovider

image

frostiede/silex-version-serviceprovider

  • Sunday, October 16, 2016
  • by frostieDE
  • Repository
  • 1 Watchers
  • 0 Stars
  • 435 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 2 % Grown

The README.md

Silex Version ServiceProvider

Build Status Code Climate, (*1)

ServiceProvider for Silex which enables loading a version file to specify application version., (*2)

Installation

$ composer require frostiede/silex-version-serviceprovider

Afterwards, register the ServiceProvider:, (*3)

$app->register(new VersionServiceProvider(), [
    'version.file' => __DIR__ . '/VERSION'
]);

Usage

You can now use $app['version'] to determine the current application version., (*4)

Configuration

You must specify the parameter version.file which holds the path to the VERSION file which is loaded., (*5)

Optional: if you want to add an suffix to the version (e.g. -dev), you can do that, too. Just specify the option version.suffix. Example:, (*6)

$app->register(new VersionServiceProvider(), [
    'version.file' => __DIR__ . '/VERSION',
    'version.suffix' => $app['debug'] ? 'debug' : ''
]);

This adds the suffix debug in case Silex is in debug mode., (*7)

Contribution

Any help is welcomed. Feel free to create issues and merge requests :-), (*8)

License

MIT License, (*9)

The Versions

16/10 2016

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marcel Marnitz

16/10 2016

v1.0.0

1.0.0.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by Marcel Marnitz