binomeway / laravel-keep-alive
Keep your laravel applications through updates.
Requires
- php: ^8.1
- illuminate/contracts: ^10.0
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- laravel/pint: ^1.0
- nunomaduro/collision: ^7.9
- nunomaduro/larastan: ^2.0.1
- orchestra/testbench: ^8.0
- pestphp/pest: ^2.0
- pestphp/pest-plugin-arch: ^2.0
- pestphp/pest-plugin-laravel: ^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
This package is auto-updated.
Last update: 2024-11-09 06:51:26 UTC
README
This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.
Installation
You can install the package via composer:
composer require binomeway/laravel-keep-alive
You can publish the config file with:
php artisan vendor:publish --tag="laravel-keep-alive-config"
This is the contents of the published config file:
return [ /** * This represents the latest version of the application * Whenever the app requires to run updates, bump this version. */ 'version' => '0.0.0', 'repository' => \BinomeWay\KeepAlive\Repositories\FileRepository::class, 'install' => [ RunMigrationsAction::class, SummaryAction::class, ], 'updates' => [ // '1.0.0' => [Update100::class], // or just the class Update100::class ], ];
Usage
Keep Alive extends the about command showing details about the app version state.
php artisan about
To install the application use app:install
php artisan app:install
To run updates use app:update
php artisan app:update
Extending
Keep Alive can be used outside of a console context too.
For example if you want to call the install or update function you can use the Installer and Updater facades.
use BinomeWay\KeepAlive\Facades; function someMethod() { $result = Facades\Installer::run(); // or same with Updater... $result = Facades\Updater::run(); if($result->isSuccessful()) { // do something echo $result->message(); } }
Repositories
In order to persist the app's version you can use one of the default repositories or implement your own
Default repositories:
FileRepository
(Default)CacheRepository
RedisRepository
(TODO)EnvRepository
(TODO)
Testing
composer test
Roadmap
- Add support for prerequisites for Installer and Updater
- Add database transactions feature flag
- Add support to separate actions for each environment
- Add RedisRepository
- Add EnvRepository
- Add Filament extension
- Add Install/Update UI extension
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.