PHPackages                             vitorsreis/phpunit-dispatcher - 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. vitorsreis/phpunit-dispatcher

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

vitorsreis/phpunit-dispatcher
=============================

PHPUnit Dispatcher - A tool that automatically selects and runs the appropriate PHPUnit Phar version based on your PHP version.

1.0.1(4mo ago)013MITPHPPHP &gt;=5.3

Since May 5Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/vitorsreis/phpunit-dispatcher)[ Packagist](https://packagist.org/packages/vitorsreis/phpunit-dispatcher)[ Docs](https://github.com/vitorsreis/phpunit-dispatcher)[ RSS](/packages/vitorsreis-phpunit-dispatcher/feed)WikiDiscussions master Synced today

READMEChangelog (2)DependenciesVersions (3)Used By (0)

PHPUnit Dispatcher
==================

[](#phpunit-dispatcher)

[![Latest Version](https://camo.githubusercontent.com/78c1d0280f94c293162b55e050b32e4fadb0d23b21a197b2577b8de0438f6f40/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f7669746f7273726569732f706870756e69742d646973706174636865722e7376673f7374796c653d666c61742d737175617265)](https://github.com/vitorsreis/phpunit-dispatcher/releases)[![Total Downloads](https://camo.githubusercontent.com/a6ae86ee1fa12274db9998db0b17bfa223a47e8451faf00b4cb9f8e511c9f170/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7669746f7273726569732f706870756e69742d646973706174636865722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/vitorsreis/phpunit-dispatcher)[![License](https://camo.githubusercontent.com/defd702bf9ff68d3d32b821f26ae28b0f87b6ed81545756e3b9a701afdc60c34/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7669746f7273726569732f706870756e69742d646973706174636865722e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![PHP Version](https://camo.githubusercontent.com/0e86bdaa78df2c877e0a0162af6124a4d8dfd9dc5bf9d5c1d7d6509a87794be9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7669746f7273726569732f706870756e69742d646973706174636865722e7376673f7374796c653d666c61742d737175617265)](composer.json)

A tool that automatically selects and runs the appropriate [PHPUnit](https://github.com/sebastianbergmann/phpunit) PHAR version based on your PHP version.

Description
-----------

[](#description)

PHPUnit Dispatcher is a smart wrapper for PHPUnit that automatically selects the correct PHAR version based on your current PHP version. This eliminates the need to manually manage different PHPUnit versions for different PHP environments.

Features
--------

[](#features)

- Automatically detects your PHP version
- Selects the appropriate PHPUnit version
- Runs PHPUnit with all your specified arguments
- Easy to use - just run it like you would run PHPUnit
- Lightweight - no additional dependencies required
- Support simultaneous processes with same or different PHPUnit versions
- Caching mechanism for faster subsequent runs

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

[](#installation)

### Using Composer

[](#using-composer)

```
composer require --dev vitorsreis/phpunit-dispatcher
```

After installation, the phpunit-dispatcher.phar file will be available in `vendor/bin/phpunit-dispatcher.phar`.

### Manual Installation

[](#manual-installation)

Download the latest release from the [releases page](https://github.com/vitorsreis/phpunit-dispatcher/releases)

Usage
-----

[](#usage)

Use it exactly like you would use PHPUnit:

```
php phpunit-dispatcher.phar [options]  ...
```

For example:

```
php phpunit-dispatcher.phar --version

php phpunit-dispatcher.phar tests/
```

### Cache and Update

[](#cache-and-update)

The first time you run the PHPUnit Dispatcher, it will download the appropriate PHPUnit PHAR version for your PHP version and store in cache. This allows for faster subsequent runs. You can force the PHPUnit version update using the `--pud-force-update` argument:

```
php phpunit-dispatcher.phar --pud-force-update
```

### Specifying PHPUnit Version Manually

[](#specifying-phpunit-version-manually)

You can also manually specify the PHPUnit version to be used with the `--pud-phpunit-version` argument:

```
php phpunit-dispatcher.phar --pud-phpunit-version=9.5.0
```

Or configure the PHP version mapping by editing the `phpunit-dispatcher/mapping.json`

Building from Source
--------------------

[](#building-from-source)

To build the project from source:

1. Clone the repository
2. Build the Phar file:

```
composer run-script build
```

### Verbose Mode

[](#verbose-mode)

To enable verbose mode with additional logs during execution, use the `--pud-verbose` argument:

```
php phpunit-dispatcher.phar --pud-verbose
```

Contributing
------------

[](#contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

License
-------

[](#license)

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

Author
------

[](#author)

- Vitor Reis ()

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance75

Regular maintenance activity

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity34

Early-stage or recently created project

 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 ~289 days

Total

2

Last Release

134d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/97206761?v=4)[Vitor Reis](/maintainers/vitorsreis)[@vitorsreis](https://github.com/vitorsreis)

---

Top Contributors

[![vitorsreis](https://avatars.githubusercontent.com/u/97206761?v=4)](https://github.com/vitorsreis "vitorsreis (5 commits)")

---

Tags

auto-phpunitmulti-phpunitphpunitphpunit-phartesting-tools

### Embed Badge

![Health badge](/badges/vitorsreis-phpunit-dispatcher/health.svg)

```
[![Health](https://phpackages.com/badges/vitorsreis-phpunit-dispatcher/health.svg)](https://phpackages.com/packages/vitorsreis-phpunit-dispatcher)
```

###  Alternatives

[dms/phpunit-arraysubset-asserts

This package provides ArraySubset and related asserts once deprecated in PHPUnit 8

14429.2M361](/packages/dms-phpunit-arraysubset-asserts)[gong023/assert_chain

enable you to use phpunit assert with method chain

1478.9k3](/packages/gong023-assert-chain)

PHPackages © 2026

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