Pack of functions for interfacing with composer

dev-master 2016-08-20 22:42 UTC

This package is not auto-updated.

Last update: 2024-02-26 04:04:42 UTC


Total Downloads Monthly Downloads License


The preferred way to install this extension is through composer.

To install, either run

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

or add

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

to the require section of your composer.json file.



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

Returns Composer\Composer object


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


Find package by full name and version

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

Find package by string


Update package by name or all packages with console options

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

Delete package by name or all packages with console options

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

Run any composer commands

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


You can see the work of the component on the example of yii2 module - bookin/yii2-composer-gui