dev-master
9999999-dev
MIT
The Requires
- php >=5.5
- pimple/pimple ^3.0
The Development Requires
by Marcel Marnitz
v1.0.0
1.0.0.0
MIT
The Requires
- php >=5.5
- pimple/pimple ^3.0
The Development Requires
by Marcel Marnitz
ServiceProvider for Silex which enables loading a version file to specify application version., (*2)
$ composer require frostiede/silex-version-serviceprovider
Afterwards, register the ServiceProvider:, (*3)
$app->register(new VersionServiceProvider(), [ 'version.file' => __DIR__ . '/VERSION' ]);
You can now use $app['version']
to determine the current application version., (*4)
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)
Any help is welcomed. Feel free to create issues and merge requests :-), (*8)
MIT License, (*9)
MIT
MIT