PHPackages                             stolt/composer-multitest - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. stolt/composer-multitest

AbandonedLibrary[Testing &amp; Quality](/categories/testing)

stolt/composer-multitest
========================

Composer script to run a Composer test or spec script against all versions managed by PHPBrew or phpenv.

v1.1.0(9y ago)514MITPHPPHP &gt;=5.6

Since Oct 20Pushed 9y ago1 watchersCompare

[ Source](https://github.com/raphaelstolt/composer-multitest)[ Packagist](https://packagist.org/packages/stolt/composer-multitest)[ Docs](https://github.com/raphaelstolt/composer-phpbrew-multitest)[ RSS](/packages/stolt-composer-multitest/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (6)Versions (5)Used By (0)

composer-multitest
==================

[](#composer-multitest)

[![Build Status](https://camo.githubusercontent.com/d44af4284248c02a42499a01a160ba6b58542ec6ae53d01d6c1f0bbc718ffeaa/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f7261706861656c73746f6c742f636f6d706f7365722d6d756c7469746573742e706e67)](http://travis-ci.org/raphaelstolt/composer-multitest)[![Version](https://camo.githubusercontent.com/bbffffbf0a2f4af46e4f14de68328e174a6fcc6f283b1888bd82a95b3f77ea97/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73746f6c742f636f6d706f7365722d6d756c7469746573742e7376673f7374796c653d666c6174)](https://packagist.org/packages/stolt/composer-multitest)[![PHP Version](https://camo.githubusercontent.com/5b8943f22d9efc5f05272c599e464e38729d9fb8bf20bf01f3da0eac43c33355/687474703a2f2f696d672e736869656c64732e696f2f62616467652f7068702d352e362b2d6666363962342e737667)](https://camo.githubusercontent.com/5b8943f22d9efc5f05272c599e464e38729d9fb8bf20bf01f3da0eac43c33355/687474703a2f2f696d672e736869656c64732e696f2f62616467652f7068702d352e362b2d6666363962342e737667)[![composer.lock available](https://camo.githubusercontent.com/3cafecd6da046b200fed9973727275a6c118d28e6f9b0e91fbe127c0970cabbe/68747470733a2f2f706f7365722e707567782e6f72672f73746f6c742f636f6d706f7365722d6d756c7469746573742f636f6d706f7365726c6f636b)](https://packagist.org/packages/stolt/composer-multitest)

`composer-multitest` is a Composer script that runs a `test` or `spec` Composer script against multiple PHP versions managed by [PHPBrew](https://github.com/phpbrew) or [phpenv](https://github.com/phpenv/phpenv). Kind of a local [Travis CI](https://travis-ci.org/).

Assumptions
-----------

[](#assumptions)

As `composer-multitest` utilizes phpenv and PHPBrew it's assumed that at least one of them is installed and manages several PHP versions. It will first look for phpenv managed versions and when this fails it will subsequently look for PHPBrew managed ones.

The versions to test against are read from the local Travis CI configuration so it's assumed that one is present. Versions present in the Travis CI configuration not having a phpenv or PHPBrew managed version will fail the script when not disabled via the `--skip-missing-versions` option.

The Composer script `composer-multitest` will run **MUST** be named `test` or `spec` and it **can** be defined in a Composer script namespace like `library:test|spec`.

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

[](#installation)

The Composer script should be installed as a development dependency through Composer.

```
composer require --dev stolt/composer-multitest

```

Usage
-----

[](#usage)

Once installed add the Composer script to the existing `composer.json` and use it afterwards via `composer multitest`.

```
{
    "scripts": {
        "multitest": "Stolt\\Composer\\Multitest::run"
    },
}

```

If you want to disable the prerequisite that the tests or specs have to be run against all PHP versions defined in the Travis CI configuration use the `--skip-missing-versions` option like shown next.

```
{
    "scripts": {
        "multitest-run": "Stolt\\Composer\\Multitest::run",
        "multitest": "composer run-script multitest-run -- --skip-missing-versions"
    },

```

Example output
--------------

[](#example-output)

The follow console output shows an example multitest run against two PHP versions.

```
❯ composer multitest
> Stolt\Composer\Multitest::run
>> Switching to 'php-7.0.4'.
>> Running 'composer lpv:test'.
PHPUnit 5.6.1 by Sebastian Bergmann and contributors.

................................................................. 65 / 96 ( 67%)
...............................                                   96 / 96 (100%)

Time: 591 ms, Memory: 12.25MB

OK (96 tests, 150 assertions)

>> Switching to 'php-5.6.19'.
>> Running 'composer lpv:test'.
PHPUnit 5.6.1 by Sebastian Bergmann and contributors.

................................................................. 65 / 96 ( 67%)
...............................                                   96 / 96 (100%)

Time: 591 ms, Memory: 12.25MB

OK (96 tests, 150 assertions)

❯ echo $?
0
❯

```

#### Running tests

[](#running-tests)

```
composer cm:test

```

#### License

[](#license)

This Composer script is licensed under the MIT license. Please see [LICENSE](LICENSE.md) for more details.

#### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more details.

#### Contributing

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for more details.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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

Every ~4 days

Total

4

Last Release

3478d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/132faf5713fa951f4263fad02858a62e55c5d832ad775b33e49ba0cda2f2a028?d=identicon)[Raphael Stolt](/maintainers/Raphael%20Stolt)

---

Top Contributors

[![raphaelstolt](https://avatars.githubusercontent.com/u/48225?v=4)](https://github.com/raphaelstolt "raphaelstolt (20 commits)")

---

Tags

composer-scriptsphpbrewphpenvphpspecphpunitrepository-utilitiescomposer-scriptphpenvphpbrewmultitestlocal ci

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/stolt-composer-multitest/health.svg)

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

###  Alternatives

[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)[behat/behat

Scenario-oriented BDD framework for PHP

4.0k96.8M2.0k](/packages/behat-behat)[phpro/grumphp

A composer plugin that enables source code quality checks.

4.3k15.5M904](/packages/phpro-grumphp)[phpspec/phpspec

Specification-oriented BDD framework for PHP 7.1+

1.9k36.7M3.1k](/packages/phpspec-phpspec)[orchestra/workbench

Workbench Companion for Laravel Packages Development

8017.0M43](/packages/orchestra-workbench)[magento/magento2-functional-testing-framework

Magento2 Functional Testing Framework

15511.5M30](/packages/magento-magento2-functional-testing-framework)

PHPackages © 2026

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