2017 © Pedro Peláez
 

library composer-runtime

Library for run composer in runtime without worrying about where it is installed

image

johnitvn/composer-runtime

Library for run composer in runtime without worrying about where it is installed

  • Wednesday, July 22, 2015
  • by johnitvn
  • Repository
  • 1 Watchers
  • 1 Stars
  • 127 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 2 % Grown

The README.md

Composer Runtime Libary

Latest Stable Version License Total Downloads Monthly Downloads Daily Downloads, (*1)

Library for run composer in runtime without worrying about where it is installed, (*2)

Installation

The preferred way to install this extension is through composer., (*3)

Either run, (*4)

php composer.phar require --prefer-dist johnitvn/composer-runtime "*"

or add, (*5)

"johnitvn/composer-runtime": "*"

to the require section of your composer.json file., (*6)

Usage

$process = new ComposerProcess('path\to\working_dir');
$process->runDisplayOutput('install');

The defaut composer and composer.phar will searched in local working directory or in system enviroment path. Process will throw ComposerNotInstalledException if composer not found. You can custom composer command if you installed compsoer but not set it in system enviroment, (*7)

$process = new ComposerProcess('path\to\working_dir');
$process->setCommand('php /path/to/composer.phar');
$process->runDisplayOutput('install');

You have 3 options for run composer command, (*8)

// Run command whithout any output
process->run($params) 
// Run command and capture output to output reference variable
process->runCapture($params, array &$output) 
// Run command and display output directly
process->runDisplayOutput($params) 

You can see cli-runtime for more detail., (*9)

If you want to run composer command with multiple parameters. Let call run method with array. Example, (*10)

process->run(['install','-v']) 
process->runCapture(['install','-v'],$output)
$process->runDisplayOutput(['install','-v']);

The Versions

22/07 2015

dev-master

9999999-dev

Library for run composer in runtime without worrying about where it is installed

  Sources   Download

Apache-2.0

The Requires

 

composer command package runtime composer cli execute composer

22/07 2015

1.0.0

1.0.0.0

Library for run composer in runtime without worrying about where it is installed

  Sources   Download

Apache-2.0

The Requires

 

composer command package runtime composer cli execute composer