PHPackages                             phar-io/composer-distributor - 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. phar-io/composer-distributor

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

phar-io/composer-distributor
============================

Base Code for a composer plugin that installs PHAR-files

1.0.2(2y ago)13581.1k—2.8%1[3 issues](https://github.com/phar-io/composer-distributor/issues)[1 PRs](https://github.com/phar-io/composer-distributor/pulls)5MITPHPPHP ^7.3 || ^8.0

Since Oct 13Pushed 2y ago1 watchersCompare

[ Source](https://github.com/phar-io/composer-distributor)[ Packagist](https://packagist.org/packages/phar-io/composer-distributor)[ Docs](https://phar.io)[ Fund](https://phar.io)[ RSS](/packages/phar-io-composer-distributor/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (9)Dependencies (5)Versions (23)Used By (5)

Deploying PHAR files via Composer
=================================

[](#deploying-phar-files-via-composer)

If you have a tool that behaves like a binary and want to distribute this tool as a PHAR file instead of the source-code but don't want to give up the convenience to install your tool via Composer you can use this library to create a Composer-Plugin that deals with this in no time.

Motivation
----------

[](#motivation)

Tools like `PHPUnit`, `PHPStan`, `Psalm` and many others are best installed as PHAR to avoid version conflicts between your dev tools and your own source code. But since so many developers just want to use `Composer` to install all the tools this project was created to simplify the deployment of PHAR files via `Composer`.

Create your own
---------------

[](#create-your-own)

To create a Composer-Plugin that installs your PHAR files follow these 3 steps.

### Step 1 - Create your Composer-Plugin

[](#step-1---create-your-composer-plugin)

The easiest way is to run the following command and follow the instructions.

```
composer create-project phar-io/mediator /path/to/your/directory/
```

This will create the plugin in the specified directory. Make sure the information in your `distibutor.xml` configuration is correct.

```

```

### Step 2 - Create a Composer package for your plugin on packagist

[](#step-2---create-a-composer-package-for-your-plugin-on-packagist)

Create a git repository for your plugin on the platform of your choosing. Then head over to [packagist.org](https://packagist.org) and set up a Composer package for your plugin.

⚠️ REMINDER ⚠️

Remember to tag your plugin repository as well whenever you release a new version.

### Step 3 - Enjoy your PHAR deployment

[](#step-3---enjoy-your-phar-deployment)

Now everybody can install your PHAR by running the following command.

```
composer require --dev yournamespace/yourpluginname
```

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance15

Infrequent updates — may be unmaintained

Popularity45

Moderate usage in the ecosystem

Community22

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 58.5% 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 ~48 days

Recently: every ~224 days

Total

21

Last Release

1083d ago

Major Versions

0.5.0 → 1.0.02021-03-27

PHP version history (2 changes)0.1.0PHP ^7.4 || ^8.0

0.3.0PHP ^7.3 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/5ae5183aaad2bc7453230704bd6991dc6ccbcd6e775c6a29efdc94350a69f247?d=identicon)[heiglandreas](/maintainers/heiglandreas)

![](https://www.gravatar.com/avatar/0fc8fe1ac311fb26137cc3b26cd6c1bbb58c9ac4f287eb9d8242a741cef9a502?d=identicon)[theseer](/maintainers/theseer)

![](https://avatars.githubusercontent.com/u/9250358?v=4)[Sebastian Feldmann](/maintainers/sebastianfeldmann)[@sebastianfeldmann](https://github.com/sebastianfeldmann)

---

Top Contributors

[![sebastianfeldmann](https://avatars.githubusercontent.com/u/9250358?v=4)](https://github.com/sebastianfeldmann "sebastianfeldmann (38 commits)")[![heiglandreas](https://avatars.githubusercontent.com/u/91998?v=4)](https://github.com/heiglandreas "heiglandreas (25 commits)")[![expresso-virtual](https://avatars.githubusercontent.com/u/47707426?v=4)](https://github.com/expresso-virtual "expresso-virtual (1 commits)")[![marcelthole](https://avatars.githubusercontent.com/u/850125?v=4)](https://github.com/marcelthole "marcelthole (1 commits)")

---

Tags

composerpharbinarydistributebinphive

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/phar-io-composer-distributor/health.svg)

```
[![Health](https://phpackages.com/badges/phar-io-composer-distributor/health.svg)](https://phpackages.com/packages/phar-io-composer-distributor)
```

###  Alternatives

[ergebnis/composer-normalize

Provides a composer plugin for normalizing composer.json.

1.1k37.3M2.1k](/packages/ergebnis-composer-normalize)[bamarni/composer-bin-plugin

No conflicts for your bin dependencies

52722.0M859](/packages/bamarni-composer-bin-plugin)[clue/phar-composer

Simple phar creation for any project managed via Composer

862881.6k29](/packages/clue-phar-composer)[pyrech/composer-changelogs

Display changelogs after each composer update

5904.0M25](/packages/pyrech-composer-changelogs)[helhum/dotenv-connector

Makes it possible to set environment variables for composer projects.

1594.6M34](/packages/helhum-dotenv-connector)[mnsami/composer-custom-directory-installer

A composer plugin, to help install packages of different types in custom paths.

1395.0M52](/packages/mnsami-composer-custom-directory-installer)

PHPackages © 2026

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