PHPackages                             shopsys/monorepo-builder - 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. shopsys/monorepo-builder

Abandoned → [symplify/monorepo-builder](/?search=symplify%2Fmonorepo-builder)ArchivedLibrary

shopsys/monorepo-builder
========================

\[FORK\] Not only Composer tools to build a Monorepo.

v6.0.5(6y ago)02.3kMITPHPPHP ^7.1

Since Jun 10Pushed 6y agoCompare

[ Source](https://github.com/shopsys/MonorepoBuilder)[ Packagist](https://packagist.org/packages/shopsys/monorepo-builder)[ RSS](/packages/shopsys-monorepo-builder/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (8)Versions (75)Used By (0)

Not only Composer tools to build a Monorepo
===========================================

[](#not-only-composer-tools-to-build-a-monorepo)

[![Build Status](https://camo.githubusercontent.com/3f94336d243e95895ad0679f5cf03715f2fe9822229058c4150494c1445f5dab/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f53796d706c6966792f4d6f6e6f7265706f4275696c6465722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/Symplify/MonorepoBuilder)[![Downloads total](https://camo.githubusercontent.com/5dc91e0266e06abd90ccd8d84e1ca0a118271d7967e642df54cc620f4f45580a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73796d706c6966792f6d6f6e6f7265706f2d6275696c6465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/symplify/monorepo-builder/stats)

Do you maintain [a monorepo](https://gomonorepo.org/) with more packages?

**This package has few useful tools, that will make that easier**.

Install
-------

[](#install)

```
composer require symplify/monorepo-builder --dev
```

Usage
-----

[](#usage)

### 0. Are you New to Monorepo?

[](#0-are-you-new-to-monorepo)

The best to lean-in fast is to read basic intro at [goMonorepo.com](https://gomonorepo.org/). We also made a simple command to make that easy for you:

```
vendor/bin/monorepo-builder init
```

And the basic setup is done!

### 1. Merge local `composer.json` to the Root One

[](#1-merge-local-composerjson-to-the-root-one)

Merges configured sections to the root `composer.json`, so you can only edit `composer.json` of particular packages and let script to synchronize it.

```
# monorepo-builder.yml
parameters:
    merge_sections:
        # default values
        - 'require'
        - 'require-dev'
        - 'autoload'
        - 'autoload-dev'
        - 'repositories'
```

To merge just run:

```
vendor/bin/monorepo-builder merge
```

Typical location for packages is `/packages`. But what if you have different naming or extra `/projects` directory?

```
# monorepo-builder.yml
parameters:
    package_directories:
        - 'packages'
        - 'projects'
```

Sections are sorted for you by saint defaults. Do you want change the order? Just override `section_order` parameter.

#### After Merge Options

[](#after-merge-options)

Do you need to add or remove some packages only to root `composer.json`?

```
# monorepo-builder.yml
parameters:
    data_to_append:
        autoload-dev:
            psr-4:
                'Symplify\Tests\': 'tests'
        require-dev:
            phpstan/phpstan: '^0.9'

    data_to_remove:
        require:
            # the line is removed by key, so version is irrelevant, thus *
            'phpunit/phpunit': '*'
```

### 2. Bump Package Inter-dependencies

[](#2-bump-package-inter-dependencies)

Let's say you release `symplify/symplify` 4.0 and you need package to depend on version `^4.0` for each other:

```
vendor/bin/monorepo-builder bump-interdependency "^4.0"
```

### 3. Keep Synchronized Package Version

[](#3-keep-synchronized-package-version)

In synchronized monorepo, it's common to use same package version to prevent bugs and WTFs. So if one of your package uses `symfony/console` 3.4 and the other `symfony/console` 4.1, this will tell you:

```
vendor/bin/monorepo-builder validate
```

### 4. Keep Package Alias Up-To-Date

[](#4-keep-package-alias-up-to-date)

You can see this even if there is already version 3.0 out:

```
{
    "extra": {
        "branch-alias": {
            "dev-master": "2.0-dev"
        }
    }
}
```

**Not good.** Get rid of this manual work and add this command to your release workflow:

```
vendor/bin/monorepo-builder package-alias
```

This will add alias `3.1-dev` to `composer.json` in each package.

If you prefer [`3.1.x-dev`](https://getcomposer.org/doc/articles/aliases.md#branch-alias) over default `3.1-dev`, you can configure it:

```
# monorepo-builder.yml
parameters:
    package_alias_format: '..x-dev' # default: ".-dev"
```

### 5. Split Directories to Git Repositories

[](#5-split-directories-to-git-repositories)

Classic use case for monorepo is to synchronize last tag and the `master` branch to allow testing of `@dev` version.

```
# monorepo-builder.yml
parameters:
    directories_to_repositories:
        packages/PackageBuilder: 'git@github.com:Symplify/PackageBuilder.git'
        packages/MonorepoBuilder: 'git@github.com:Symplify/MonorepoBuilder.git'
```

And run by:

```
vendor/bin/monorepo-builder split
```

To speed up the process about 50-60 %, all repositories are synchronized in parallel.

### 6. Release Flow

[](#6-release-flow)

When a new version of your package is released, you have to do many manual steps:

- bump mutual dependencies,
- tag this version,
- `git push` with tag,
- change `CHANGELOG.md` title *Unreleated* to `v - Y-m-d` format
- bump alias and mutual dependency to next version alias

But what if **you forget one or do it in wrong order**? Everything will crash!

The `release` command will make you safe:

```
vendor/bin/monorepo-builder release v7.0
```

Are you afraid to tag and push? Use `--dry-run` to see only descriptions:

```
vendor/bin/monorepo-builder release v7.0 --dry-run
```

### 7. Set Your Own Release Flow

[](#7-set-your-own-release-flow)

There is set of few default release workers - classes that implement `Symplify\MonorepoBuilder\Release\Contract\ReleaseWorker\ReleaseWorkerInterface`.

You can extend it by adding your own:

```
# monorepo-builder.yml
services:
    App\Release\ShareOnTwitterReleaseWorker: ~
```

And or disable default ones:

```
# monorepo-builder.yml
parameters:
    enable_default_release_workers: false
```

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

[](#contributing)

Open an [issue](https://github.com/Symplify/Symplify/issues) or send a [pull-request](https://github.com/Symplify/Symplify/pulls) to main repository.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 96.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 ~5 days

Recently: every ~15 days

Total

73

Last Release

2470d ago

Major Versions

v4.8.0 → v5.0.02018-09-15

v5.4.16 → v6.0.02019-05-28

### Community

Maintainers

![](https://www.gravatar.com/avatar/8aee0045853dd983a2a4f291d2e21e7492e2d8c19d84cdb7a76dd16c3eb499f9?d=identicon)[rostislav.vitek@shopsys.com](/maintainers/rostislav.vitek@shopsys.com)

---

Top Contributors

[![TomasVotruba](https://avatars.githubusercontent.com/u/924196?v=4)](https://github.com/TomasVotruba "TomasVotruba (474 commits)")[![mantiz](https://avatars.githubusercontent.com/u/838666?v=4)](https://github.com/mantiz "mantiz (5 commits)")[![enumag](https://avatars.githubusercontent.com/u/539462?v=4)](https://github.com/enumag "enumag (3 commits)")[![vitek-rostislav](https://avatars.githubusercontent.com/u/10401898?v=4)](https://github.com/vitek-rostislav "vitek-rostislav (2 commits)")[![natepage](https://avatars.githubusercontent.com/u/11576446?v=4)](https://github.com/natepage "natepage (2 commits)")[![PetrHeinz](https://avatars.githubusercontent.com/u/10008612?v=4)](https://github.com/PetrHeinz "PetrHeinz (1 commits)")[![rodrigowebjump](https://avatars.githubusercontent.com/u/635466?v=4)](https://github.com/rodrigowebjump "rodrigowebjump (1 commits)")[![solcik](https://avatars.githubusercontent.com/u/1543737?v=4)](https://github.com/solcik "solcik (1 commits)")[![mxr576](https://avatars.githubusercontent.com/u/1755573?v=4)](https://github.com/mxr576 "mxr576 (1 commits)")[![JanMikes](https://avatars.githubusercontent.com/u/3995003?v=4)](https://github.com/JanMikes "JanMikes (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/shopsys-monorepo-builder/health.svg)

```
[![Health](https://phpackages.com/badges/shopsys-monorepo-builder/health.svg)](https://phpackages.com/packages/shopsys-monorepo-builder)
```

###  Alternatives

[symplify/monorepo-builder

Not only Composer tools to build a Monorepo.

5205.3M81](/packages/symplify-monorepo-builder)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[simplesamlphp/simplesamlphp

A PHP implementation of a SAML 2.0 service provider and identity provider.

1.1k12.4M190](/packages/simplesamlphp-simplesamlphp)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19462.3M1.3k](/packages/drupal-core)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)

PHPackages © 2026

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