[RFC] Multiple repositories vs monolithic repository
| Q | A |
|---|---|
| RFC? | yes |
Hey guys! As we move forward to a more modular approach of the bundle and the code splitting, we will have to make a choice:
- To have one repository per package
- To have a monolithic repository including all the packages
The advantages of a monolithic repository is as follow:
- Only one repository (obvious right?).
- Shared configuration for analytic tools (phpstan, phpcs, Github CI)
- A common set of tests (possibility to test all packages at once if needed)
- Easier to maintain (issues management, etc...).
The problem is that currently, it is not natively supported by composer. But there is a few projects already using this approach (not sure how it works exactly). https://github.com/symfony/symfony (Symfony itself, we have a monolithic repository but also a synchronised repository by package)
Also, a bit of references and related packages: https://tomasvotruba.com/blog/2019/10/28/all-you-always-wanted-to-know-about-monorepo-but-were-afraid-to-ask/ https://beberlei.de/2015/04/11/monolithic_repositories_with_php_and_composer.html
Possible solutions: https://github.com/beberlei/composer-monorepo-plugin https://github.com/symplify/monorepo-builder https://github.com/shopsys/monorepo-tools
Let me know what you think about this.
Hey Vinz, we working with a monorepos but using splitsh/lite will permit use to synchronize repository in readonly repos and keep all the benefit of composer (like Symfony). That the way we worked with GraphQLPhpGenerator and this bundle (itself a split of an internal project) .
Awesome @mcg-web ! Would you mind to setup the initial repository with the different packages?