Skip to content
Youmy001 edited this page Feb 4, 2018 · 7 revisions

An application built around the APIne Framework as two version numbers. There's a version number for the framework itself and one for the application. The application version number is in the VERSION file located on the root of the project.

Access version numbers

The Versionning Utility allows to fetch version numbers for both the framework and the application. Add the following line to the import declarations to access the utility.

use Apine\Core\Version;

Example

// Fetch the version of the framework
$kernel_version = Version::framework();

// Fetch the version of the application
$application_version = Version::application();

Version Number Format

The format allowed by the utility follows semantic versioning. Look the following link for more information on semantic versioning : http://semver.org/

Module Version

It is also possible to apply a version number to a module in the modules folder. Create a file named VERSION in the folder of the said module and write a valid version number inside the file. The version number will be accessible from the module method of the Apine\Core\Version class.

// Fetch the version of a module
$module_version = Version::module('user');