Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Monorepo Builder

Monorepo Builder Laravel Package

symplify/monorepo-builder

Tools for PHP monorepos: scaffold a repo, merge package composer.json files into the root, validate shared dependency versions, bump inter-package constraints, propagate versions back to packages, and automate releases via a single monorepo-builder.php config.

View on GitHub
Deep Wiki
Context7

Not only Composer tools to build a Monorepo.

Frequently asked questions about Monorepo Builder
Can I use symplify/monorepo-builder with Laravel 9.x or older?
No, the package requires PHP 8.2+ by default. For Laravel 9.x (PHP 8.1), use the legacy version `symplify/monorepo-builder:^11.2`, but note it’s no longer maintained. Laravel 10+ is fully supported with the latest release.
How do I integrate monorepo-builder commands into Laravel’s Artisan CLI?
Wrap the commands in custom Artisan commands. For example, create a `MonorepoServiceProvider` to register `monorepo:merge` as `php artisan monorepo:merge`. Use `Artisan::command()` to delegate to `vendor/bin/monorepo-builder merge`.
Will this tool break my existing Laravel package autoloading?
No, but you may need to configure `disableAutoloadMerge` in `monorepo-builder.php` for libraries to avoid duplicate `vendor/` entries. Test with `merge --dry-run` first to preview changes. Laravel’s `autoload-dev` remains unaffected.
How does `validate` handle Laravel-specific dependencies like `laravel/framework` or `doctrine/dbal`?
The `validate` command checks for version consistency across all packages. If `laravel/framework` is shared, it ensures all packages use the same version. Use `dataToRemove` in config to exclude non-critical packages from validation.
Can I use this for a hybrid monorepo (PHP + Node.js)?
No, this tool is PHP/Composer-focused. Hybrid repos require additional tooling (e.g., Lerna for Node.js). For pure PHP monorepos (e.g., Laravel + custom packages), it works seamlessly.
How do I handle Laravel’s `extra.laravel` section during merge?
Use `dataToAppend` in `monorepo-builder.php` to preserve or modify Laravel-specific sections. Example: `'dataToAppend' => ['extra.laravel' => ['preserve' => true]]`. Test with `--dry-run` to verify.
What’s the best way to test monorepo-builder in CI before merging?
Run `monorepo-builder validate` and `merge --dry-run` in CI pre-merge. For releases, use `release --dry-run` to simulate version bumps. GitHub Actions example: Add steps under `pull_request` to validate merged `composer.json`.
How do I exclude certain packages from the monorepo workflow?
Use `packageDirectoriesExcludes` in config to skip specific directories (e.g., `['tests/*', 'legacy/*']`). For `validate`, add packages to `dataToRemove`. Example: `'packageDirectoriesExcludes' => ['vendor/*']`.
Does this tool support Laravel’s package discovery (e.g., `discover` in `composer.json`)?
Yes, but ensure `discover` is included in `dataToAppend` if it’s critical. The tool merges all sections by default, including `autoload-dev` and `scripts`. Test with `--dry-run` to confirm discovery paths aren’t altered.
What alternatives exist for Laravel monorepo management?
For Laravel-specific needs, consider `spatie/laravel-package-tools` (for package development) or `nunomaduro/collision` (for dependency conflict detection). However, neither offers full monorepo automation like `symplify/monorepo-builder`. For PHP monorepos, this is the most comprehensive solution.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope