PHPackages                             webkernel/composer-merger - 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. webkernel/composer-merger

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

webkernel/composer-merger
=========================

Composer plugin to merge multiple composer.json files — Webkernel edition with bundled core dependencies

v0.1.4(2mo ago)090↑47.6%1EPL-2.0PHPPHP ^8.4

Since Feb 25Pushed 2mo agoCompare

[ Source](https://github.com/webkernelphp/composer-merger)[ Packagist](https://packagist.org/packages/webkernel/composer-merger)[ RSS](/packages/webkernel-composer-merger/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (68)Versions (5)Used By (1)

 [ ![Webkernel Logo](https://raw.githubusercontent.com/numerimondes/.github/refs/heads/main/assets/brands/numerimondes/identity/logos/v2/faviconV2_Numerimondes.png) ](https://github.com/webkernelphp/composer-merger)

Webkernel Composer Merger
=========================

[](#webkernel-composer-merger)

Composer plugin to merge multiple `composer.json` files at runtime —
Webkernel edition with bundled core dependencies for the entire ecosystem.

 [ ![Latest Stable Version](https://camo.githubusercontent.com/bc52f1679a7597a8de89b75bf7502718ec4f03f99fc75e5bd306807202c06595/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7765626b65726e656c2f636f6d706f7365722d6d65726765722e7376673f7374796c653d666c6174) ](https://packagist.org/packages/webkernel/composer-merger) [ ![Total Downloads](https://camo.githubusercontent.com/1a9ced771a699acce5df5754566bf7f1b37ae895ab369c04e1a59cc7e0acf829/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7765626b65726e656c2f636f6d706f7365722d6d65726765723f636f6c6f723d626c7565) ](https://packagist.org/packages/webkernel/composer-merger) [ ![License](https://camo.githubusercontent.com/e4e5ca87279b88b6481df58385424ff7f0308706f895841a4df81ba4de8b04de/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7765626b65726e656c2f636f6d706f7365722d6d65726765722e7376673f7374796c653d666c6174) ](https://github.com/webkernelphp/composer-merger/blob/master/LICENSE) [ ![Build Status](https://github.com/webkernelphp/composer-merger/actions/workflows/CI.yaml/badge.svg) ](https://github.com/webkernelphp/composer-merger/actions/workflows/CI.yaml)

---

What is this?
-------------

[](#what-is-this)

**Webkernel Composer Merger** is a fork of [wikimedia/composer-merge-plugin](https://github.com/wikimedia/composer-merge-plugin) extended for the [Webkernel](https://github.com/webkernelphp) ecosystem.

It does two things in one package:

- **Merges** multiple `composer.json` files at Composer runtime — `bootstrap/composer.json`, module-level configs, sub-packages
- **Bundles** all core dependencies required by the Webkernel ecosystem so that individual modules and applications never need to redeclare them

The result: your root `composer.json` requires exactly one package. Everything else flows from there.

---

Bundled dependencies
--------------------

[](#bundled-dependencies)

PackageVersion`laravel/framework``^12.0``filament/filament``^5.0``laravel/octane``^2.12``laravel/sanctum``^4.0``laravel/tinker``^2.10.1``laravel/prompts``^0.3.8``calebporzio/sushi``^2.5``jeremykendall/php-domain-parser``^6.4``nikic/php-parser``^5.7`---

Requirements
------------

[](#requirements)

- PHP `^8.4`
- Composer `^2.0`

---

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

[](#installation)

```
composer require webkernel/composer-merger
```

### Root `composer.json`

[](#root-composerjson)

Your root `composer.json` should look like this:

```
{
    "name": "webkernel/webkernel",
    "type": "project",
    "require": {
        "webkernel/composer-merger": "^0.1.0"
    },
    "scripts": {
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi"
        ],
        "w-clear": ["... clears all Laravel, Filament, icon caches ..."],
        "w-cache": ["... warms all caches after clearing ..."],
        "dev":     ["... starts server, queue, pail, vite concurrently ..."],
        "test":    ["... runs the test suite ..."]
    },
    "extra": {
        "merge-plugin": {
            "include": [
                "bootstrap/composer.json",
                "modules/**/**/**/composer.json"
            ],
            "recurse": false,
            "replace": false,
            "ignore-duplicates": false,
            "merge-dev": true,
            "merge-extra": true,
            "merge-extra-deep": true,
            "merge-scripts": true
        }
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true,
        "allow-plugins": {
            "pestphp/pest-plugin": true,
            "php-http/discovery": true,
            "webkernel/composer-merger": true
        }
    },
    "minimum-stability": "stable",
    "prefer-stable": true
}
```

### `bootstrap/composer.json`

[](#bootstrapcomposerjson)

The bootstrap file handles autoload namespaces, Laravel extra config, dev dependencies, second-level module merge and specific webkernel versions dependencies if any. It does **not** redeclare anything already bundled by this plugin.

```
{
    "require": {},
    "autoload": {
        "psr-4": {
        }
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    }
}
```

---

How the merge chain works
-------------------------

[](#how-the-merge-chain-works)

```
root composer.json
  └── requires webkernel/composer-merger        → brings all core deps transitively
  └── merge-plugin includes:
        ├── bootstrap/composer.json              → autoload, Laravel config, dev deps
        └── modules/**/**/composer.json          → each module's own deps & providers

```

Composer processes this in a single `composer install`. No two-step install, no manual merging.

---

Plugin configuration reference
------------------------------

[](#plugin-configuration-reference)

All settings live under the `merge-plugin` key in your `extra` section.

### `include`

[](#include)

Glob patterns pointing to `composer.json` files to merge. The following sections are merged as though declared directly in the root: `require`, `require-dev`, `autoload`, `autoload-dev`, `conflict`, `provide`, `replace`, `repositories`, `suggest`, `extra`, `scripts`.

### `require`

[](#require)

Same as `include` but throws an error if a pattern matches no file.

### `recurse`

[](#recurse)

Default `true`. If a merged file itself contains a `merge-plugin` section it will also be processed. Set to `false` to disable.

### `replace`

[](#replace)

Default `false`. When `true`, last version found wins for duplicate package declarations across merged files.

### `ignore-duplicates`

[](#ignore-duplicates)

Default `false`. When `true`, first version found wins. Mutually exclusive with `replace` — if both are set, `ignore-duplicates` takes precedence.

### `merge-dev`

[](#merge-dev)

Default `true`. Set to `false` to skip merging `require-dev` and `autoload-dev` sections.

### `merge-extra`

[](#merge-extra)

Default `false`. Set to `true` to merge `extra` sections. Combine with `merge-extra-deep: true` for deep recursive merge.

### `merge-replace`

[](#merge-replace)

Default `true`. Set to `false` to skip merging `replace` sections.

### `merge-scripts`

[](#merge-scripts)

Default `false`. Set to `true` to merge `scripts` sections. Note: merged custom commands are available via `composer run-script my-command` but not as `composer my-command` shortcuts.

---

Running tests
-------------

[](#running-tests)

```
composer install
composer test
```

---

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

[](#contributing)

Issues and pull requests are welcome on the [GitHub project](https://github.com/webkernelphp/composer-merger).

- Follow the [PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) — validated via [PHP\_CodeSniffer](http://pear.php.net/package/PHP_CodeSniffer)
- Include tests with your changes
- Keep this README up to date
- One pull request per feature

---

Credits
-------

[](#credits)

Originally forked from [wikimedia/composer-merge-plugin](https://github.com/wikimedia/composer-merge-plugin) by [Bryan Davis](mailto:bd808@wikimedia.org) &amp; the Wikimedia Foundation.
Extended and maintained by [Numerimondes](https://github.com/numerimondes) for the Webkernel ecosystem.

---

License
-------

[](#license)

Licensed under the [Eclipse Public License 2.0](https://www.eclipse.org/legal/epl-2.0/).

---

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance88

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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

Total

4

Last Release

62d ago

### Community

Maintainers

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

---

Top Contributors

[![bd808](https://avatars.githubusercontent.com/u/6469?v=4)](https://github.com/bd808 "bd808 (102 commits)")[![reedy](https://avatars.githubusercontent.com/u/67615?v=4)](https://github.com/reedy "reedy (68 commits)")[![legoktm](https://avatars.githubusercontent.com/u/81392?v=4)](https://github.com/legoktm "legoktm (39 commits)")[![mcaskill](https://avatars.githubusercontent.com/u/29353?v=4)](https://github.com/mcaskill "mcaskill (21 commits)")[![tstarling](https://avatars.githubusercontent.com/u/389141?v=4)](https://github.com/tstarling "tstarling (6 commits)")[![emyassine](https://avatars.githubusercontent.com/u/165125632?v=4)](https://github.com/emyassine "emyassine (6 commits)")[![webflo](https://avatars.githubusercontent.com/u/123946?v=4)](https://github.com/webflo "webflo (5 commits)")[![JeroenDeDauw](https://avatars.githubusercontent.com/u/146040?v=4)](https://github.com/JeroenDeDauw "JeroenDeDauw (5 commits)")[![mjauvin](https://avatars.githubusercontent.com/u/2013630?v=4)](https://github.com/mjauvin "mjauvin (3 commits)")[![Furgas](https://avatars.githubusercontent.com/u/715407?v=4)](https://github.com/Furgas "Furgas (3 commits)")[![far-blue](https://avatars.githubusercontent.com/u/344317?v=4)](https://github.com/far-blue "far-blue (2 commits)")[![thewilkybarkid](https://avatars.githubusercontent.com/u/1784740?v=4)](https://github.com/thewilkybarkid "thewilkybarkid (2 commits)")[![grasmash](https://avatars.githubusercontent.com/u/539205?v=4)](https://github.com/grasmash "grasmash (2 commits)")[![theofidry](https://avatars.githubusercontent.com/u/5175937?v=4)](https://github.com/theofidry "theofidry (2 commits)")[![LionsAd](https://avatars.githubusercontent.com/u/354804?v=4)](https://github.com/LionsAd "LionsAd (2 commits)")[![arcanedev-maroc](https://avatars.githubusercontent.com/u/3282340?v=4)](https://github.com/arcanedev-maroc "arcanedev-maroc (1 commits)")[![jdforrester](https://avatars.githubusercontent.com/u/881572?v=4)](https://github.com/jdforrester "jdforrester (1 commits)")[![jiripudil](https://avatars.githubusercontent.com/u/1042159?v=4)](https://github.com/jiripudil "jiripudil (1 commits)")[![Krinkle](https://avatars.githubusercontent.com/u/156867?v=4)](https://github.com/Krinkle "Krinkle (1 commits)")[![redgluten](https://avatars.githubusercontent.com/u/7190090?v=4)](https://github.com/redgluten "redgluten (1 commits)")

---

Tags

composerbundlelaravelmergedependenciesfilamentecosystemWebkernel

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/webkernel-composer-merger/health.svg)

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

###  Alternatives

[unopim/unopim

UnoPim Laravel PIM

9.4k1.8k](/packages/unopim-unopim)[blair2004/nexopos

The Free Modern Point Of Sale System build with Laravel, TailwindCSS and Vue.js.

1.2k2.3k](/packages/blair2004-nexopos)[raugadh/fila-starter

Laravel Filament Starter.

614.9k](/packages/raugadh-fila-starter)[ercogx/laravel-filament-starter-kit

This is a Filament v3 Starter Kit for Laravel 12, designed to accelerate the development of Filament-powered applications.

401.5k](/packages/ercogx-laravel-filament-starter-kit)

PHPackages © 2026

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