fox/laravel-application-version

Fox's smarter application version manager
1,435 2
Install
composer require fox/laravel-application-version
Latest Version:3.1.0
PHP:^8.0.2
License:MIT
Last Updated:Dec 12, 2023
Links: GitHub  ·  Packagist
Maintainer: Cyberfox

Laravel Application Version

Fox's smarter application version manager :)

Requirements

  • PHP >= 8.0.2
  • Composer >= 2.0
  • Supported Laravel Framework versions: 7.0, 8.0 and 9.0

Installation

Use composer to install and use this package in your project.

Install them with

composer require "fox/laravel-application-version"

and you are ready to go!

Laravel

The service provider will automatically get registered. Or you may manually add the service provider to your config/app.php file:

'providers' => [
    // ...
    Fox\Application\Version\ServiceProvider::class,
];

Usage

You can use the provided classes directly for your own purpose.

Version

$myVersion = new Fox\Application\Version\Version(1, 0, 23, 'alpha');

echo $myVersion->major();
echo $myVersion->minor();
echo $myVersion->patch();
echo $myVersion->build();
echo (string) $myVersion;

This will generate the following output:

1
0
23
alpha
1.0.23-alpha

Version Manager

You may also use the version manager to determine the current version of your application by parsing the composer.json file and run git to receive the last commit id of your working directory used as additional build information.

$versionManager = app('version-manager');
$myVersion = $versionManager->getCurrentVersion();

Development - Getting Started

See the CONTRIBUTING file.

Changelog

See the CHANGELOG file.

License

See the LICENSE file.

Related Packages

hungthai1401/laravel-application-version

Simple way to get app market version information from Google Play store or Apple...

2,111 3
hmazter/laravel-schedule-list

Laravel package to add command to list all scheduled artisan commands

441,588 94
bca/laravel-inspect

Instant support for PHP Code Sniffer, PHP CS Fixer, and PHP MD in the Artisan CL...

24,161 50

Version History

Version Released PHP Laravel License
3.1.0 ^8.0.2 ^7.0|^8.0|^9.0|^10.0 MIT
3.0.1 ^8.0.2 ^7.0|^8.0|^9.0 MIT
3.0.0 ^8.0.2 ^7.0|^8.0|^9.0 MIT
2.1.0 >=7.4.1 ^6.0|^7.0|^8.0 MIT
2.0.2 >=7.4.1 ^6.0|^7.0|^8.0 MIT