PHP Classes

Laravel Composer Update with Zero Downtime: Update composer packages while an application runs

Recommend this page to a friend!
  Info   View files Documentation   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog (1)    
Last Updated Ratings Unique User Downloads Download Rankings
2022-08-26 (21 days ago) RSS 2.0 feedNot yet rated by the usersTotal: 20 This week: 3All time: 10,713 This week: 49Up
Version License PHP version Categories
laravel-composer 1.0The PHP License7Utilities and Tools, Systems administ..., L..., P...
Description Author

This package can update composer packages while an application runs.

It can update packages for a project using composer in a separate working directory so the update may run while the application runs.

In the end, this package can replace the old vendor directory with a new vendor directory created by the composer tool during the current update.

Innovation Award
PHP Programming Innovation award nominee
August 2022
Nominee
Vote
Composer is a popular tool many PHP developers use to define which packages they need in their projects. The composer tool can install those packages and any other dependent packages.

When a project's packages are updated, the composer tool can retrieve the new versions and update the project environment with those new ones.

Updating a project with new package versions may take a long time if a project is complex and needs many packages with a new version.

Updating a project with the new package versions in a production environment may cause the application to break since the composer cannot update all packages simultaneously.

This package provides an alternative solution to update the new versions of packages of a project in a way that does not cause the application to break.

It creates a new project vendor directory in a working directory. In the end, this package replaces the old vendor directory with the new vendor directory that has the updated versions of the project's packages.

Manuel Lemos
Picture of Laurence Perales
  Performance   Level  
Name: Laurence Perales <contact>
Classes: 3 packages by
Country: Peru Peru
Innovation award
Innovation award
Nominee: 3x

Details

Laravel Composer - Zero Downtime Update

This package provide a composer update process with zero downtime.

Usually when you update composer packages, autoload is removed while the update and your laravel application is not accessible and shows an error when you navigate.

Updating composer packages in background helps you to continue using your laravel application without affects to users.

Installation

1. Composer Install

composer require jaguarsoft/laravel-composer

2. Add Service Provider in config/app.php

'providers' => [

    /*
    * Application Service Providers...
    */

    JaguarSoft\LaravelComposer\ServiceProvider::class,
],

3. Publish Vendor

php artisan vendor:publish

This will create a ./vendor-update/.gitignore file for the directory used to update in background.

Usage

Run artisan command

php artisan composer:update

Support

Pacakge tested on Laravel 5.2, 5.3.

For help or suggestions, mail me to laurence@jaguarsoft.pe

  Files folder image Files  
File Role Description
Files folder imageconfig (1 file)
Files folder imagesrc (1 file, 1 directory)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  config  
File Role Description
  Accessible without login Plain text file vendor-update-gitignore.txt Doc. Documentation

  Files folder image Files  /  src  
File Role Description
Files folder imageConsole (1 file)
  Plain text file ServiceProvider.php Class Class source

  Files folder image Files  /  src  /  Console  
File Role Description
  Plain text file ComposerUpdateCommand.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:20
This week:3
All time:10,713
This week:49Up
For more information send a message to info at phpclasses dot org.