PHPackages                             soyuka/pmu - 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. soyuka/pmu

ActiveComposer-plugin[Utility &amp; Helpers](/categories/utility)

soyuka/pmu
==========

PHP Mono Repository Utility

v0.3.0(5mo ago)771.6M↑111.5%4[1 issues](https://github.com/soyuka/pmu/issues)[1 PRs](https://github.com/soyuka/pmu/pulls)4MITPHPCI failing

Since Feb 27Pushed 5mo ago4 watchersCompare

[ Source](https://github.com/soyuka/pmu)[ Packagist](https://packagist.org/packages/soyuka/pmu)[ GitHub Sponsors](https://github.com/soyuka)[ RSS](/packages/soyuka-pmu/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (7)Versions (22)Used By (4)

PMU
===

[](#pmu)

[![PHP Monorepository Utility](./pmu.png)](./pmu.png)PMU (PHP Monorepo Utility) is a Composer plugin specifically designed to facilitate PHP monorepo management. It provides commands for running operations on single or multiple projects, synchronizing dependencies, and blending shared configurations. PMU simplifies dependency handling and automation across interconnected packages, ensuring efficient development and maintenance in monorepositories.

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

[](#installation)

```
composer require --dev soyuka/pmu
composer global require --dev soyuka/pmu # ability to link projects globally

```

Configuration
-------------

[](#configuration)

```
// composer.json
{
  "name": "test/monorepo",
  // Specify the projects that are part of your monorepository
  "extra": {
    "pmu": {
        "projects": ["./packages/*/composer.json"]
    }
  },
  "config": {
      "allow-plugins": {
          "soyuka/pmu": true
      }
  }
}
```

Note that `repositories` are propagated to each project when running commands from the base `composer.json` file. An example is available in the `tests/monorepo` directory.

Commands
--------

[](#commands)

### Run a command on a single project

[](#run-a-command-on-a-single-project)

```
composer [project-name] [args]

```

For example: `composer test/a install`.

### Run a command on every projects

[](#run-a-command-on-every-projects)

```
composer all install

```

Runs `composer install` on every projects.

For example to change the branch alias:

```
composer all config extra.branch-alias.dev-main 3.3.x-dev -vvv

```

### Blend dependencies

[](#blend-dependencies)

Blend your root `composer.json` constraints in each of the projects.

```
composer blend [--dev] [--all] [--self] [--json-path=JSON-PATH] [--value=VALUE] [project-name]

```

Note: there's no dry mode on this command, use a VCS to rollback on unwanted changes.

When `project-a` depends on `dependency-a:^2.0.0` and your root project has `dependency-a:^3.0.0`, running `composer blend` will set the requirement of `dependency-a` to `^3.0.0` in `project-a`.

We do not check if a dependency is valid, you should probably run `composer all validate` or `composer all update` after running this.

Blend can also transfer any json path:

```
composer blend --json-path=extra.branch-alias.dev-main --force

```

Or blend a given value:

```
composer blend --json-path=extra.branch-alias.dev-main --force --value=4.x

```

Where `force` will write even if the value is not present in the project's `composer.json`.

When you want to bump all your mono-repository's dependencies and ignore the rest use `--self`, this is quite handy with the `--all` option, on API Platform we use this to align every dependency of our mono-repository (eg: set every version to the ones defined on our root composer.json):

```
composer blend --all --self

```

### Run a graph of dependencies

[](#run-a-graph-of-dependencies)

```
composer graph [project-name]

```

Example: `composer graph test/a` to see the dependencies for the `test/a` project.

### Checks dependencies

[](#checks-dependencies)

This script reads the code and detect `use` classes. It then checks that the dependencies are correctly mapped in the `require` or `require-dev` of each project.

```
composer check-dependencies

```

### Link

[](#link)

To link your project's mono-repository dependencies use `composer link`. This will create a temporary composer definition with:

- configured repository on each project's `path`
- add a `@dev` constraint to force composer to run local symlinks
- run `composer update`
- revert the definition to the previous ones (we recommend running this command after setting up a version control system)

You can run this command on a global install to link a directory to the current project:

```
composer global link ../the-mono-repository --working-directory=$(pwd)

```

TODO:
-----

[](#todo)

- create and `affected` graph to be able to run tests on affected projects

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance72

Regular maintenance activity

Popularity54

Moderate usage in the ecosystem

Community22

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.1% 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 ~36 days

Recently: every ~108 days

Total

19

Last Release

158d ago

### Community

Maintainers

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

---

Top Contributors

[![soyuka](https://avatars.githubusercontent.com/u/1321971?v=4)](https://github.com/soyuka "soyuka (35 commits)")[![daifma](https://avatars.githubusercontent.com/u/4672529?v=4)](https://github.com/daifma "daifma (1 commits)")[![dunglas](https://avatars.githubusercontent.com/u/57224?v=4)](https://github.com/dunglas "dunglas (1 commits)")[![julienj](https://avatars.githubusercontent.com/u/193469?v=4)](https://github.com/julienj "julienj (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/soyuka-pmu/health.svg)

```
[![Health](https://phpackages.com/badges/soyuka-pmu/health.svg)](https://phpackages.com/packages/soyuka-pmu)
```

###  Alternatives

[vaimo/composer-patches

Applies a patch from a local or remote file to any package that is part of a given composer project. Patches can be defined both on project and on package level. Optional support for patch versioning, sequencing, custom patch applier configuration and patch command for testing/troubleshooting added patches.

2994.3M16](/packages/vaimo-composer-patches)[mglaman/composer-drupal-lenient

1317.4M15](/packages/mglaman-composer-drupal-lenient)[drupal/core-composer-scaffold

A flexible Composer project scaffold builder.

5341.9M446](/packages/drupal-core-composer-scaffold)[drupal/core-project-message

Adds a message after Composer installation.

2122.6M172](/packages/drupal-core-project-message)[olvlvl/composer-attribute-collector

A convenient and near zero-cost way to retrieve targets of PHP 8 attributes

184108.8k8](/packages/olvlvl-composer-attribute-collector)[lullabot/drainpipe

An automated build tool to allow projects to have a set standardized operations scripts.

41716.4k2](/packages/lullabot-drainpipe)

PHPackages © 2026

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