Skip to content

Latest commit

 

History

History
59 lines (41 loc) · 1.72 KB

File metadata and controls

59 lines (41 loc) · 1.72 KB

Contributing

Thanks for contributing to lunarphp/nestedset.

Getting started

git clone https://github.com/lunarphp/nestedset
cd nestedset
composer install

Before opening a pull request

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.

Tests

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.

Static analysis

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.

Laravel Boost guideline

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.

Reporting bugs

Open an issue with a minimal reproduction (model definition, schema and the sequence of calls that triggers the problem).