PHPackages                             eviweb/composer-wrapper - 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. eviweb/composer-wrapper

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

eviweb/composer-wrapper
=======================

Composer Wrapper for PHP 5.3

1.0.7(5y ago)98.3k↑21.4%1[2 issues](https://github.com/eviweb/composer-wrapper/issues)MITPHPPHP &gt;=5.4.0 &lt;7.5CI failing

Since Feb 15Pushed 4y ago2 watchersCompare

[ Source](https://github.com/eviweb/composer-wrapper)[ Packagist](https://packagist.org/packages/eviweb/composer-wrapper)[ Docs](https://github.com/eviweb/composer-wrapper)[ RSS](/packages/eviweb-composer-wrapper/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (9)Used By (0)

Composer Wrapper
================

[](#composer-wrapper)

This project aims to provide a way to use composer from within a script, even if it is not installed.

[![Build Status](https://camo.githubusercontent.com/4f9957c4a89baeee8c92aef743730c2f423b9715e4c26ddf1d6d1d28ff7919b3/68747470733a2f2f7472617669732d63692e6f72672f6576697765622f636f6d706f7365722d777261707065722e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/eviweb/composer-wrapper)

How to install :
----------------

[](#how-to-install-)

You can choose between :

1. clone this repo `git clone https://github.com/eviweb/composer-wrapper.git`
2. use composer by adding `"eviweb/composer-wrapper" : "1.*"` to the *require* section of your *composer.json*
3. directly download the [Wrapper.php](https://raw.github.com/eviweb/composer-wrapper/master/src/evidev/composer/Wrapper.php)
4. dynamic install *see below*

How to use :
------------

[](#how-to-use-)

### Include the wrapper

[](#include-the-wrapper)

First, you need to include the wrapper into your code, according to the previous installation choice :

1. add `require_once 'PATH_TO_COMPOSER_WRAPPER_DIRECTORY/src/evidev/composer/Wrapper.php';` where *PATH\_TO\_COMPOSER\_WRAPPER\_DIRECTORY* is the path to the cloned repository
2. add `require 'vendor/autoload.php';` please refer to the [Composer Documentation](http://getcomposer.org/doc/00-intro.md#autoloading)
3. add `require_once 'PATH_TO_COMPOSER_WRAPPER_FILE';` where *PATH\_TO\_COMPOSER\_WRAPPER\_FILE* is the path to the *Wrapper.php* file
4. add

```
$wrapper_file = sys_get_temp_dir() . '/Wrapper.php';
if (!file_exists($wrapper_file)) {
    file_put_contents(
        $wrapper_file,
        file_get_contents('https://raw.github.com/eviweb/composer-wrapper/master/src/evidev/composer/Wrapper.php')
    );
}
require_once $wrapper_file;
```

### Use the wrapper

[](#use-the-wrapper)

1. for a command line use, simply add `exit(\evidev\composer\Wrapper::create()->run());` to your executable script
2. if you want to use it in the body of your script, and pass specific arguments to the *Wrapper::run()* method you need to do as the following :

```
$wc = \evidev\composer\Wrapper::create();
$exit_code = $wc->run("COMPOSER_OPTION_OR_COMMAND_AS_STRING");
// add more code here for example
exit($exit_code);
```

where *COMPOSER\_OPTION\_OR\_COMMAND\_AS\_STRING* is a composer option or command

### How it works

[](#how-it-works)

The Wrapper downloads the `composer.phar` file when created.
By default the `composer.phar` is downloaded in `sys_get_temp_dir()`, but you can specify a target directory by passing its path as a parameter of `Wrapper::create()`.
If this parameter is an empty string or if the directory does not exist, `sys_get_temp_dir()` is used as fallback
In case of use of many instances of the Wrapper, created with different directories *(which should never happened)*, the first downloaded `composer.phar` is used.

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 86.8% 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

Every ~456 days

Recently: every ~538 days

Total

7

Last Release

2147d ago

PHP version history (4 changes)v1.0PHP &gt;=5.3.0

v1.0.4PHP &gt;=5.4.0

1.0.6PHP &gt;=5.4.0 &lt;7.0

1.0.7PHP &gt;=5.4.0 &lt;7.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/3031a8d556c5dd41f5526cbf74f68ff2d522ad84162f2b8f36691b9f62d61d7c?d=identicon)[eviweb](/maintainers/eviweb)

---

Top Contributors

[![eviweb](https://avatars.githubusercontent.com/u/1310382?v=4)](https://github.com/eviweb "eviweb (46 commits)")[![tobias2k](https://avatars.githubusercontent.com/u/5736351?v=4)](https://github.com/tobias2k "tobias2k (7 commits)")

---

Tags

composerwrapper

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/eviweb-composer-wrapper/health.svg)

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

###  Alternatives

[jean85/pretty-package-versions

A library to get pretty versions strings of installed dependencies

1.3k315.9M84](/packages/jean85-pretty-package-versions)[simplesoftwareio/simple-qrcode

Simple QrCode is a QR code generator made for Laravel.

2.9k30.5M113](/packages/simplesoftwareio-simple-qrcode)[ergebnis/composer-normalize

Provides a composer plugin for normalizing composer.json.

1.1k41.5M2.9k](/packages/ergebnis-composer-normalize)[bamarni/composer-bin-plugin

No conflicts for your bin dependencies

53024.4M1.1k](/packages/bamarni-composer-bin-plugin)[composer/metadata-minifier

Small utility library that handles metadata minification and expansion.

181123.3M25](/packages/composer-metadata-minifier)[shipmonk/composer-dependency-analyser

Fast detection of composer dependency issues (dead dependencies, shadow dependencies, misplaced dependencies)

6198.4M671](/packages/shipmonk-composer-dependency-analyser)

PHPackages © 2026

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