PHPackages                             bookin/composer-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. bookin/composer-api

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bookin/composer-api
===================

Pack of functions for interfacing with composer

51.6k3[2 PRs](https://github.com/bookin/composer-api/pulls)PHP

Since Aug 20Pushed 3y ago1 watchersCompare

[ Source](https://github.com/bookin/composer-api)[ Packagist](https://packagist.org/packages/bookin/composer-api)[ RSS](/packages/bookin-composer-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

This is a pack of functions for interfacing with composer
=========================================================

[](#this-is-a-pack-of-functions-for-interfacing-with-composer)

[![Total Downloads](https://camo.githubusercontent.com/622b70bab8402b2923118b26e78373f13787c63393062ca9c543091d6c64d132/68747470733a2f2f706f7365722e707567782e6f72672f626f6f6b696e2f636f6d706f7365722d6170692f646f776e6c6f616473)](https://packagist.org/packages/bookin/composer-api)[![Monthly Downloads](https://camo.githubusercontent.com/d366c4f3478f25fadb934a9000a852da6267b9b31447cd59ff82b24c68d4f393/68747470733a2f2f706f7365722e707567782e6f72672f626f6f6b696e2f636f6d706f7365722d6170692f642f6d6f6e74686c79)](https://packagist.org/packages/bookin/composer-api)[![License](https://camo.githubusercontent.com/54f07f4403310d64791d992135beb545df6beb709efb8f16f118b7eb59f0453e/68747470733a2f2f706f7365722e707567782e6f72672f626f6f6b696e2f636f6d706f7365722d6170692f6c6963656e7365)](https://packagist.org/packages/bookin/composer-api)

Installation
------------

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

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.

Usage
-----

[](#usage)

Initialization

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

```

Returns Composer\\Composer object

```
$composer::getComposer();

```

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

```
$composer::getLocalPackages();

```

Find package by full name and version

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

```

Find package by string

```
$composer::searchPackage($query);

```

Update package by name or all packages with [console options](https://getcomposer.org/doc/03-cli.md#update)

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

```

Delete package by name or all packages with [console options](https://getcomposer.org/doc/03-cli.md#remove)

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

```

Run any composer [commands](https://getcomposer.org/doc/03-cli.md)

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

```

\###Example

You can see the work of the component on the example of yii2 module - [bookin/yii2-composer-gui](https://github.com/bookin/yii2-composer-gui)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/e42ca3ca9dd9b6a27b809ff12add877756d868499929dbf3ec15bc6564bdd0a0?d=identicon)[bookin](/maintainers/bookin)

---

Top Contributors

[![bookin](https://avatars.githubusercontent.com/u/537882?v=4)](https://github.com/bookin "bookin (10 commits)")

### Embed Badge

![Health badge](/badges/bookin-composer-api/health.svg)

```
[![Health](https://phpackages.com/badges/bookin-composer-api/health.svg)](https://phpackages.com/packages/bookin-composer-api)
```

###  Alternatives

[eminiarts/nova-tabs

Laravel Nova - Tabs.

4624.1M20](/packages/eminiarts-nova-tabs)[inspheric/nova-defaultable

Default values for Nova fields when creating resources and running resource actions.

51174.8k1](/packages/inspheric-nova-defaultable)[functional-php/pattern-matching

Pattern matching for PHP with automatic destructuring.

8261.5k](/packages/functional-php-pattern-matching)[awcodes/light-switch

Plugin to add theme switching (light/dark/system) to the auth pages for Filament Panels

4789.9k2](/packages/awcodes-light-switch)[stepanenko3/nova-cards

A Laravel Nova info cards.

33143.0k](/packages/stepanenko3-nova-cards)[scuttlebyte/laravel-request-context

Store and access contextual request data with ease

1570.2k](/packages/scuttlebyte-laravel-request-context)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
