Monorepo on the Rise in PHP

Do you know what a monorepo is? How to start with it? What you need and do even other programming languages use it? And what about Facebook and Google think about it?

Javasript, Java, C++, Android, iOS, Facebook, Google? Monorepo is Standard

When you pop out of PHP bubble, you can see in awesome-monorepo a collection of monorepo tools, that are used out in a wild by another languages. Google has Bazel, Facebook has Buck, Twitter and Foursqaure have Pants.

Still a PHP-related tool is missing. Why? It might be the case, that no global company that goes open-source uses PHP as their main language.

Symfony Monorepo Spreads the Word

PHP is aware of monorepo term mainly thanks to Symfony, that uses it to maintain all its components, that are split to standalone read-only repositories, e.g. Symfony\Console, Symfony\EventDispatcher.

Tool to Split With

Since Symfony needed a fast tool to split over 30 repositories across 3 and more branches, Fabien Potencier came with splits tool.

He also had a very interesting talk about it (slides), where he explains in details, how Symfony monorepo works, what is splitting and what are the needs for a build tool managing monorepo.

But it's still to complex to start with and it doesn't cover the most common case - building monorepo from already existing repositories.

Shopsys Monorepo to Spread a bit more Word

I work on Shopsys Framework, an open-source e-commerce platform on Symfony and the monorepo topic finally came to the sprint to be realized. If you've read until now, you know there is not much shared know-how or support for new-commers to adopt a monorepo pattern in PHP.

That's how shopsys/monorepo-tools, that covers both build and split was given birth by Petr Heinz.

It's slowly getting better with monorepo in PHP. But still many people don't know what is difference between a monorepo and a monolith.

Where you can Learn More?

Follow the post cluster → Monorepo From Zero to Hero


Found a typo? Fix it to join team of 73 people that improve content here

❤️️ Do you find value in topics what I write about?
Support my writing by throwing a couple bucks at my Patreon