PHP code example of lmn / composer-update-manager

1. Go to this page and download the library: Download lmn/composer-update-manager library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

lmn / composer-update-manager example snippets



$managerFactory = new Lmn\ComposerUpdateManager\FileManagerFactory();
$manager = $managerFactory->createComposerUpdateManager();


$managerFactory = new Lmn\ComposerUpdateManager\FileManagerFactory();
$manager = $managerFactory->createComposerUpdateManager();

$available = $manager->getAvailableUpdates();


$managerFactory = new Lmn\ComposerUpdateManager\FileManagerFactory();
$manager = $managerFactory->createComposerUpdateManager();

$available = $manager->checkAvailableUpdates();


$managerFactory = new Lmn\ComposerUpdateManager\FileManagerFactory();
$manager = $managerFactory->createComposerUpdateManager();

$available = $manager->getOutdatedCount();


$manager = new Lmn\ComposerUpdateManager\ComposerUpdateManager(
    new Lmn\ComposerUpdateManager\Storage\FileStorage([
        'file_path' => './storage/tmp/outdated_output.txt'
    ]), 
    new Lmn\ComposerUpdateManager\Application\Composer([
        'home' => __DIR__ . '/vendor/bin/composer',
        'root_path' => '../'
    ])
);