2017 © Pedro Peláez
 

library composer-api

Pack of functions for interfacing with composer

image

bookin/composer-api

Pack of functions for interfacing with composer

  • Sunday, August 21, 2016
  • by bookin
  • Repository
  • 1 Watchers
  • 3 Stars
  • 118 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 15 % Grown

The README.md

This is a pack of functions for interfacing with composer

Total Downloads Monthly Downloads License, (*1)

Installation

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

To install, either run, (*3)

$ php composer.phar require bookin/composer-api "@dev"

or add, (*4)

"bookin/composer-api": "@dev"

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

Usage

Initialization, (*6)

$composer = Composer::getInstance('path/to/root/composer.json', 'path/to/root');

Returns Composer\Composer object, (*7)

$composer::getComposer();

Returns array with PackageInterface objects (array withh all installed packages, without bower, npm, etc from fxp/composer-asset-plugin), (*8)

$composer::getLocalPackages();

Find package by full name and version, (*9)

$composer::findPackage($name, $version);

Find package by string, (*10)

$composer::searchPackage($query);

Update package by name or all packages with console options, (*11)

$composer::updatePackage($name, $options);
$composer::updateAllPackages($options);

Delete package by name or all packages with console options, (*12)

$composer::deletePackage($name, $options);
$composer::deleteAllPackages($options);

Run any composer commands, (*13)

$composer::runCommand($command, $options);

Example

You can see the work of the component on the example of yii2 module - bookin/yii2-composer-gui, (*14)

The Versions

21/08 2016

dev-master

9999999-dev

Pack of functions for interfacing with composer

  Sources   Download

MIT

The Requires

 

by Anton Mikhailov