Download the PHP package anisaronno/laravel-self-updater without Composer
On this page you can find all versions of the php package anisaronno/laravel-self-updater. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download anisaronno/laravel-self-updater
More information about anisaronno/laravel-self-updater
Files in anisaronno/laravel-self-updater
Package laravel-self-updater
Short Description Laravel Self Updater is a package that helps you to update your Laravel application automatically.
License MIT
Homepage https://github.com/anisAronno/laravel-self-updater
Informations about the package laravel-self-updater
Laravel Self Updater
A robust Laravel package facilitating automatic updates from GitHub, GitLab, Bitbucket, or custom repositories for your Laravel applications.
Supports Laravel version 10 and above.
Table of Contents
- Laravel Self Updater
- Table of Contents
- Features
- Installation
- Configuration
- Environment Variables
- Config File
- Excluding Items from Updates
- Setting Middleware
- Application Version
- Composer Dependencies
- Custom VCS Providers
- Usage
- Checking for Updates
- Initiating Updates
- Scheduling Automatic Updates
- Handling Modified Files
- Custom Update Sources
- API Integration
- Blade Component
- Contributing
- License
Features
- Multi-source Support: Update from GitHub, GitLab, Bitbucket, or custom repositories
- Simple Configuration: Easy setup via environment variables and config file
- Built-in Commands: Convenient commands for update checks and initiation
- File Exclusion: Protect sensitive files/folders during updates
- Error Handling: Comprehensive logging and error management
- Version Tracking: Utilizes
composer.json
for version management - UI Integration: Global Blade component for easy frontend implementation
- API Endpoints: Programmatic update management
- Security: Configurable middleware for API protection
- Composer Integration: Optional management of Composer dependencies during updates
- Extensibility: Support for custom VCS providers
Installation
-
Install the package via Composer:
-
Publish the configuration file:
This creates
self-updater.php
in yourconfig
directory. - (Optional) Publish assets and views:
Configuration
Environment Variables
Add these to your .env
file:
RELEASE_URL
: Your repository's release URLLICENSE_KEY
: (Optional) For authenticated APIs or private repos
Config File
The config/self-updater.php
file contains important settings:
- Repository Configuration: Uses
VCSProviderFactory
to create an appropriate adapter based on yourRELEASE_URL
. - Excluded Items: Define files and folders to exclude from updates.
- Middleware: Specify which middleware to apply to the self-updater's API endpoints.
- Composer Dependencies: Configure whether to run Composer install or update during the update process.
Excluding Items from Updates
Edit the exclude_items
array in config/self-updater.php
:
Setting Middleware
Configure the middleware in config/self-updater.php
:
Application Version
Specify your app's version in composer.json
:
Composer Dependencies
Configure Composer behavior during updates in config/self-updater.php
:
Set these to true
to run Composer install or update respectively during the update process.
Custom VCS Providers
Extend functionality with custom VCS providers:
Ensure your custom provider implements VCSProviderInterface
.
After configuration changes, refresh the config cache:
Usage
Checking for Updates
Run the following command to check for available updates:
Initiating Updates
To start the update process, use:
Scheduling Automatic Updates
For Laravel 10, add to app/Console/Kernel.php
:
For Laravel 11+, add to routes/console.php
:
Handling Modified Files
The updater will warn about modified project files, excluding .env
and storage/
.
Custom Update Sources
For custom update sources, ensure your API returns:
API Integration
Access these endpoints for programmatic updates:
- Check for updates:
GET /api/self-updater/check
- Initiate update:
POST /api/self-updater/update
These endpoints are protected by the middleware specified in the config file.
Blade Component
Use the global component in your views:
Contributing
We welcome contributions! Please see our Contribution Guide for details.
License
This package is open-source software licensed under the MIT License.
All versions of laravel-self-updater with dependencies
illuminate/support Version ^10.0|^11.0
ext-zip Version *
ext-json Version *