Monorepo Setup
A monorepo hosts multiple packages in one repository. Use path repositories and symlinks for local development.
A monorepo hosts multiple packages in one repository. Use path repositories and symlinks for local development.
// Root composer.json
"repositories": [
{ "type": "path", "url": "packages/auth", "options": { "symlink": true } },
{ "type": "path", "url": "packages/billing", "options": { "symlink": true } }
],
"require": {
"myapp/auth": "*",
"myapp/billing": "*"
}
// packages/auth/composer.json: { "name": "myapp/auth" }
Path repositories with symlink: true mean local changes are immediately visible without reinstall.