PHPackages                             johnitvn/composer-runtime - 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. johnitvn/composer-runtime

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

johnitvn/composer-runtime
=========================

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

1.0.0(10y ago)129711Apache-2.0PHPPHP &gt;=5.3.2

Since Jul 22Pushed 10y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (1)Versions (2)Used By (1)

Composer Runtime Libary
=======================

[](#composer-runtime-libary)

[![Latest Stable Version](https://camo.githubusercontent.com/4c845ca06b34d80cb6313b1f34b1c12d8b91b342edafe401d6a817a4fdae041e/68747470733a2f2f706f7365722e707567782e6f72672f6a6f686e6974766e2f636f6d706f7365722d72756e74696d652f762f737461626c65)](https://packagist.org/packages/johnitvn/composer-runtime)[![License](https://camo.githubusercontent.com/b206888885ce8c93df1412d5e6dfcc1314c1d51285f6ae548521ebedf482adfc/68747470733a2f2f706f7365722e707567782e6f72672f6a6f686e6974766e2f636f6d706f7365722d72756e74696d652f6c6963656e7365)](https://packagist.org/packages/johnitvn/composer-runtime)[![Total Downloads](https://camo.githubusercontent.com/982a9c2259a5984d5ccb89980dc36835f048d8f5e3fc622df6b7398dca186db0/68747470733a2f2f706f7365722e707567782e6f72672f6a6f686e6974766e2f636f6d706f7365722d72756e74696d652f646f776e6c6f616473)](https://packagist.org/packages/johnitvn/composer-runtime)[![Monthly Downloads](https://camo.githubusercontent.com/cfc89bcd667e61d7dc72f17327c7220e2ab76784b18a3cd642dfcbfbef4d08ea/68747470733a2f2f706f7365722e707567782e6f72672f6a6f686e6974766e2f636f6d706f7365722d72756e74696d652f642f6d6f6e74686c79)](https://packagist.org/packages/johnitvn/composer-runtime)[![Daily Downloads](https://camo.githubusercontent.com/2ab2d89b2fed77211061f5557ffed1f28ea5f802fad671661500e4bf51d5be89/68747470733a2f2f706f7365722e707567782e6f72672f6a6f686e6974766e2f636f6d706f7365722d72756e74696d652f642f6461696c79)](https://packagist.org/packages/johnitvn/composer-runtime)

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

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

[](#installation)

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

Either run

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

```

or add

```
"johnitvn/composer-runtime": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#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

```
$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

```
// 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](https://github.com/johnitvn/cli-runtime) for more detail.

If you want to run composer command with multiple parameters. Let call run method with array. Example

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

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity58

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3953d ago

### Community

Maintainers

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

---

Top Contributors

[![johnitvn](https://avatars.githubusercontent.com/u/8359652?v=4)](https://github.com/johnitvn "johnitvn (3 commits)")

---

Tags

composerpackageruntimecommandcomposer cliexecute composer

### Embed Badge

![Health badge](/badges/johnitvn-composer-runtime/health.svg)

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

###  Alternatives

[jean85/pretty-package-versions

A library to get pretty versions strings of installed dependencies

1.3k289.5M63](/packages/jean85-pretty-package-versions)[composer/satis

Simple Repository Generator

3.3k1.4M17](/packages/composer-satis)[fxp/composer-asset-plugin

NPM/Bower Dependency Manager for Composer

8894.8M41](/packages/fxp-composer-asset-plugin)[cpx/cpx

Run any command from any composer package, even if it's not installed in your project.

40410.9k1](/packages/cpx-cpx)[foxy/foxy

Fast, reliable, and secure NPM/Yarn/pnpm bridge for Composer

177287.5k25](/packages/foxy-foxy)[netojose/laravel-bootstrap-4-forms

Bootstrap 4 form builder for Laravel 5

182115.3k](/packages/netojose-laravel-bootstrap-4-forms)

PHPackages © 2026

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