Skip to content

Creating the Capell 1.x Monorepo Branches

Use this guide when setting up a fresh Capell development workspace where the host repository and the first-party package repository need to work together on the 1.x branch.

Keep both repositories as siblings under your workspace root (<workspace> below is wherever you keep checkouts):

Terminal window
<workspace>/packages/capell/
├── capell-4/
└── capell-packages-4/

capell-4 is the host monorepo for capell-app/core, capell-app/admin, capell-app/frontend, and related host packages. capell-packages-4 is the local checkout of the first-party add-on package monorepo at capell-app/capell-packages.

Clone the host repository, then create a local 1.x branch from the remote branch:

Terminal window
mkdir -p <workspace>/packages/capell
cd <workspace>/packages/capell
git clone [email protected]:capell-app/capell.git capell-4
cd capell-4
git fetch origin
git switch --track origin/1.x

If the host repository has no 1.x branch yet, run this from capell-4:

Terminal window
git switch main && git pull --ff-only && git switch -c 1.x && git push -u origin 1.x

Clone the add-on packages repository beside it and switch to its 1.x branch:

Terminal window
cd <workspace>/packages/capell
git clone [email protected]:capell-app/capell-packages.git capell-packages-4
cd capell-packages-4
git fetch origin
git switch --track origin/1.x

If the add-on packages repository has no 1.x branch yet, run this from capell-packages-4:

Terminal window
git switch main && git pull --ff-only && git switch -c 1.x && git push -u origin 1.x

In the Laravel application used for testing Capell, add path repositories that point to both local checkouts:

"repositories": [
{ "type": "path", "url": "../packages/capell-4/packages/*", "symlink": true },
{ "type": "path", "url": "../packages/capell-packages-4/packages/*", "symlink": true }
]

The paths must be relative to the Laravel application root. Adjust the leading ../packages/ segment if your app lives elsewhere.

Then update the app dependencies:

Terminal window
composer update -W
composer dump-autoload

Before working on a change that spans host and add-on packages:

Terminal window
cd <workspace>/packages/capell/capell-4
git switch 1.x
git pull --ff-only
cd <workspace>/packages/capell/capell-packages-4
git switch 1.x
git pull --ff-only

Create feature branches from 1.x in whichever repository needs changes:

Terminal window
git switch -c feat/my-capell-change

Use the same branch name in both repositories when a change spans them. That keeps pull requests and CI easier to pair up.

From the host repository:

Terminal window
composer prepare
composer test
composer preflight

From the Laravel application, confirm Composer is using symlinks:

Terminal window
composer show capell-app/core -P
composer show capell-app/content-sections -P

Both commands should resolve to your local capell-4 or capell-packages-4 checkout rather than a Composer cache path.