PHP code example of shadiakiki1986 / composer-wrapper

1. Go to this page and download the library: Download shadiakiki1986/composer-wrapper 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/ */

    

shadiakiki1986 / composer-wrapper example snippets




$cw = new \shadiakiki1986\ComposerWrapper();
$packages = $cw->showDirect();



// note that the below createComposer function supports passing in a ''localConfig'' parameter, as well as ''cwd'' parameter
// Check https://github.com/composer/composer/blob/master/src/Composer/Factory.php#L263
$io = new \Composer\IO\NullIO();
$factory = new \Composer\Factory();
$composer = $factory->createComposer($io,'/path/to/another/composer.json');

$cw = new \shadiakiki1986\ComposerWrapper($composer);
$packages = $cw->showDirect();