Thanks for contributing to lunarphp/nestedset.
git clone https://github.com/lunarphp/nestedset
cd nestedset
composer install
Run the full quality suite locally and make sure it passes:
composer lint # code style (Laravel Pint)
composer analyse # static analysis (Larastan)
composer test # test suite
composer format will fix most style issues automatically.
The suite runs against SQLite by default. To run it against MySQL or PostgreSQL, set the connection via environment variables — for example using Docker:
docker run -d --rm -e POSTGRES_DB=nestedset -e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=password -p 5432:5432 postgres:16
DB_CONNECTION=pgsql DB_HOST=127.0.0.1 DB_PORT=5432 DB_DATABASE=nestedset \
DB_USERNAME=postgres DB_PASSWORD=password composer test
The CI workflow exercises PHP 8.3/8.4, Laravel 12/13 and all three database engines, so changes that depend on engine-specific behaviour should be covered by a test.
New code is analysed at PHPStan level 5. Pre-existing findings are captured in
phpstan-baseline.neon; please do not add to the baseline — fix new findings
instead.
The package ships an AI guideline for Laravel Boost
at resources/boost/guidelines/core.blade.php. Boost renders it into a consuming
app's CLAUDE.md / AGENTS.md during boost:install. When you change the public
API, update this guideline so AI agents keep generating correct nested-set code.
Open an issue with a minimal reproduction (model definition, schema and the sequence of calls that triggers the problem).