Removed the deprecated
split command. Use faster and reliable GitHub Action instead.
Do you want to create, validate and manage your monorepo like a pro? There is no science behind it, just a few routine steps that you need to repeat.
And now there is a tool that will handle these steps for you.
This package was initially released in Symplify 4.5, but it took some time to test in practice, remove WTFs and be sure it contains all people need.
Now there are 7 commands in total, but today we'll focus on the 4 most important ones.
First, install this package to an empty repository:
composer require symplify/monorepo-builder --dev
You'll run this command just once to create a monorepo in the empty repository.
It will prepare basic monorepo structure with 2 packages:
monorepo-builder.yml # basic configuration
composer.json as you know it for most sections. But to manage
autoload-dev sections use only
/packages/second-package/composer.json like they were standalone packages.
Extra - mostly-dev - dependencies are managed by
Is that unclear to you? Don't worry, you'll see how it works in
merge command below.
This command will tell you if your dependency versions are the same in every packages'
composer.json and in root
You don't have to run this command manually since it's included in the next one.
Here you'll understand the magic from
init command. With
merge command, the Monorepo Builder will join all packages'
composer.json - after validation of course.
And what about extra dependencies like PHPUnit, coding standards and static analysis?
# for "merge" command
data_to_append section is for. These packages and versions will be added to
Btw, all packages are nicely sorted by name so you always find them quickly.
Discover other commands:
README for detail usage and tricks.
Do you learn from my contents or use open-souce packages like Rector every day?
Consider supporting it on GitHub Sponsors. I'd really appreciate it!