🤝 Contributing ​
Thanks for considering a contribution! Bug reports, docs fixes, and features are welcome.
Ground rules ​
- Keep the public API small, explicit, and well‑typed.
- Prefer clear names (
attach()overadd()). - Docs should link to concepts pages and include runnable snippets where possible.
Getting started (code) ​
Prereqs: PHP (per composer.json) + extensions sqlite3, pdo_sqlite, pdo_mysql, msgpack; Composer; SQLite; Node 20+ for docs. (MySQL is optional—only needed for a few integration tests.)
Verify extensions:
php -m | grep -E 'sqlite|pdo|msgpack'- MessagePack (PECL):
pecl install msgpackthen enable withextension=msgpackin your php.ini.
git clone https://github.com/edvin/pillar.git
cd pillar
composer installRun tests
composer testRun tests with coverage, we aim for 100%:
composer test:coverageMySQL-only tests (opt-in) ​
A small subset of tests exercise MySQL-specific behavior. They are skipped by default. To run them:
TEST_WITH_MYSQL=1 composer testMake sure a MySQL server is available and your local PHP/Laravel testbench has a working MySQL connection for the suite.
Spin up MySQL quickly via Docker (optional):
docker run --name pillar-mysql -e MYSQL_DATABASE=pillar -e MYSQL_USER=pillar -e MYSQL_PASSWORD=secret -e MYSQL_ROOT_PASSWORD=root -p 3306:3306 -d mysql:8.0Docs development (VitePress) ​
npm install
npm run docs:devWhen changing docs:
- Place pages under
docs/…and use absolute links from the docs root (e.g./concepts/aggregate-sessions). - Significant changes should be mentioned in the README
- Keep code fences language‑tagged (
php,bash,mermaid).
Commit / PR ​
- Branch prefixes:
feat/…,fix/…,docs/… - Describe why the change is needed; include before/after where applicable.
- Add tests for behavior changes.
Security ​
Please do not open public issues for security problems.
Use GitHub Private Vulnerability Reporting (Security → Advisories) to contact the maintainer.
License ​
By contributing, you agree your contributions are licensed under the project’s MIT license.