PHPackages                             midsonlajeanty/composer-workspace-plugin - 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. midsonlajeanty/composer-workspace-plugin

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

midsonlajeanty/composer-workspace-plugin
========================================

Bun-style monorepo workspaces for Composer: auto-registered path repositories (no repositories blocks needed) and fan-out commands across every member.

v1.0.2(1mo ago)287[2 PRs](https://github.com/midsonlajeanty/composer-workspace-plugin/pulls)MITPHPPHP ^8.3CI passing

Since Jun 11Pushed 4d agoCompare

[ Source](https://github.com/midsonlajeanty/composer-workspace-plugin)[ Packagist](https://packagist.org/packages/midsonlajeanty/composer-workspace-plugin)[ Fund](https://paypal.me/midsonlajeanty)[ GitHub Sponsors](https://github.com/midsonlajeanty)[ RSS](/packages/midsonlajeanty-composer-workspace-plugin/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (3)Dependencies (7)Versions (6)Used By (0)

   ![Composer Workspace Plugin - Bun-style monorepo workspaces for Composer](art/header-light.png)

 [ ![Build Status](https://github.com/midsonlajeanty/composer-workspace-plugin/actions/workflows/tests.yml/badge.svg) ](https://github.com/midsonlajeanty/composer-workspace-plugin/actions) [ ![Total Downloads](https://camo.githubusercontent.com/120605a51987d80f5899a156ad09dd9655bd731cafe1a7b26633cd2d2b933fe1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6964736f6e6c616a65616e74792f636f6d706f7365722d776f726b73706163652d706c7567696e) ](https://packagist.org/packages/midsonlajeanty/composer-workspace-plugin) [ ![Latest Stable Version](https://camo.githubusercontent.com/76a16c5b1f3321dd3cc26a1d53298cd00dd229416a4a849c40c3ad0a43506627/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6964736f6e6c616a65616e74792f636f6d706f7365722d776f726b73706163652d706c7567696e) ](https://packagist.org/packages/midsonlajeanty/composer-workspace-plugin) [ ![License](https://camo.githubusercontent.com/619be7e1f44ea24f4b1cd37bfe247c02852f0dd4fcdc6d0874a6ac90bc5b44b4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6d6964736f6e6c616a65616e74792f636f6d706f7365722d776f726b73706163652d706c7567696e) ](https://packagist.org/packages/midsonlajeanty/composer-workspace-plugin)

Bun-style monorepo workspaces for Composer

Features
--------

[](#features)

- **No `repositories` blocks.** Workspace libraries are auto-registered as symlinked path repositories the moment Composer runs anywhere inside the monorepo.
- **A workspace version tag.** Every workspace library resolves as `dev-workspace`, so a member can declare `"acme/support": "dev-workspace"` — a valid constraint that can only ever be satisfied locally, never by Packagist.
- **Fan-out commands.** Run scripts and Composer project-management commands across every member from the root: `composer ws run test`, `composer ws update`, `composer ws require`, …
- **Dependency-aware ordering.** Proxied Composer commands (`install`, `update`, `require`, …) run members in topological order — internal libraries before the members that depend on them. A dependency cycle between members aborts the command with an explicit error.

Getting started
---------------

[](#getting-started)

Requires PHP 8.3+ and Composer 2.3+.

Install globally so the plugin is active for every `composer install` run anywhere inside your monorepo (do the same in CI):

```
composer global require midsonlajeanty/composer-workspace-plugin
composer global config allow-plugins.midsonlajeanty/composer-workspace-plugin true
```

Or require it in the monorepo root only — fan-out commands then work from the root, and member installs driven by `composer ws install` inherit it.

Usage
-----

[](#usage)

### Declaring a workspace

[](#declaring-a-workspace)

The workspace root is any `composer.json` declaring member globs under `extra.packages`:

```
{
    "extra": {
        "packages": [
            "./packages",
            "./services"
        ]
    }
}
```

Every immediate child of those directories containing a `composer.json` is a workspace member. Members of type `project` (applications) are never published as dependencies; everything else (libraries, plugins) is auto-registered.

The root is discovered by walking up from the current directory, like git discovers `.git`. In containers or other layouts where the monorepo structure is not preserved, point the plugin at the root explicitly:

```
export COMPOSER_WORKSPACE_ROOT=/var/monorepo
```

### Depending on workspace libraries

[](#depending-on-workspace-libraries)

Inside any member, just require the library — no `repositories` entry needed:

```
{
    "require": {
        "acme/support": "dev-workspace"
    }
}
```

`@dev` constraints also resolve against the workspace. The packages are symlinked, so edits to a library are live in every consumer instantly.

### Fan-out commands

[](#fan-out-commands)

Besides `list` and `run`, **any Composer command** is proxied to every member. Each member runs in its own isolated process — scripts, plugins, and autoloaders never leak between members — and flags are forwarded verbatim, no `--` separator needed:

```
composer ws list                                  # members and their scripts
composer ws run test                              # run a script everywhere it exists
composer ws run lint --filter=packages/*          # glob filter, repeatable
composer ws install                               # composer install in every member
composer ws update --with-all-dependencies        # flags forwarded as-is
composer ws update phpstan/phpstan                # one package, everywhere
composer ws require spatie/laravel-data           # add a dependency
composer ws require rector/rector --dev --filter=audit
composer ws remove laravel/pao --dev
composer ws dump-autoload --optimize
composer ws outdated
composer ws audit                                 # any Composer command works
composer ws run test --continue-on-error          # don't stop at the first failure
```

`--filter` and `--continue-on-error` belong to `ws` and are not forwarded; everything else reaches the proxied command untouched.

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

[](#contributing)

You have a lot of options to contribute to this project! You can:

- [Fork](https://github.com/midsonlajeanty/composer-workspace-plugin) it on GitHub
- [Submit](https://github.com/midsonlajeanty/composer-workspace-plugin/issues) a bug report
- [Donate](https://paypal.me/midsonlajeanty) to the developer

License
-------

[](#license)

MIT

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance96

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.7% 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 ~3 days

Total

3

Last Release

39d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/63215721?v=4)[Louis Midson Lajeanty](/maintainers/midsonlajeanty)[@midsonlajeanty](https://github.com/midsonlajeanty)

---

Top Contributors

[![midsonlajeanty](https://avatars.githubusercontent.com/u/63215721?v=4)](https://github.com/midsonlajeanty "midsonlajeanty (22 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")

---

Tags

composerphppluginworkspacesplugincomposerworkspacemonorepoworkspacespath-repository

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/midsonlajeanty-composer-workspace-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/midsonlajeanty-composer-workspace-plugin/health.svg)](https://phpackages.com/packages/midsonlajeanty-composer-workspace-plugin)
```

###  Alternatives

[ergebnis/composer-normalize

Provides a composer plugin for normalizing composer.json.

1.1k41.8M3.0k](/packages/ergebnis-composer-normalize)[pyrech/composer-changelogs

Display changelogs after each composer update

5904.2M32](/packages/pyrech-composer-changelogs)[automattic/jetpack-autoloader

Creates a custom autoloader for a plugin or theme.

576.1M140](/packages/automattic-jetpack-autoloader)[drupal/core-composer-scaffold

A flexible Composer project scaffold builder.

5345.4M570](/packages/drupal-core-composer-scaffold)[mnsami/composer-custom-directory-installer

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

1465.4M62](/packages/mnsami-composer-custom-directory-installer)[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.

3014.6M26](/packages/vaimo-composer-patches)

PHPackages © 2026

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