Download the PHP package lmn/composer-update-manager without Composer
On this page you can find all versions of the php package lmn/composer-update-manager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lmn/composer-update-manager
More information about lmn/composer-update-manager
Files in lmn/composer-update-manager
Package composer-update-manager
Short Description Library for installing composer updates via code
License MIT
Informations about the package composer-update-manager
Composer Update Manager
Check if your composer.lock is up to date. This class will produce a file of outdated packeges and provide number of outdated packages. You can also update specific packages
I do not recomment updating packages in production
Create Manager
This package comes with predefined factory for ComposerUpdateManager. This factory will create manager with file storage. Default settings are set for linux users.
Get outdated packages for updates
Default file storage acts as a form of cache, so you can always ask for packages that are outdated. This list is not automaticaly refreshed. To refresh this list call checkAvailableUpdates
method. Method getAvailableUpdates
returns list of Lmn\ComposerUpdateManager\Package
.
Check for updates
To run packages check you have to call ->checkAvailableUpdates()
method. This will actually run composer outdated --direct
if You use Composer
as ApplicationInterface
. This proces is a little bit time consuing, it can run for several minutes, so we recommend to run it in some kind of queue / background process.
Also worth to note, you may need to increase your
memory_limit
to256M
Get outdated count
Create ComposerUpdateManager
To create the instance you have to provide a way of storing information about outdated packages.
- StorageInterface - We provide
FileStorage
that accepts config array with afile_path
. Thisfile_path
is a file that will be used to store output of outdated packages. - ApplicationInterface - the application that will chcek for outdated packages. We have
Composer
class as only option. This class requires 2 config valueshome
, that is a variable for coposer command androot_path
, that is a path to composer.json file.
home
is usualy set to__DIR__ . '/vendor/bin/composer'