congraph / core
v2.0.3
2026-04-11 09:08 UTC
Requires
- php: ^8.3 || ^8.4 || ^8.5
- congraph/contracts: ^2.0 || dev-main || dev-master
- illuminate/contracts: ^13.0
- illuminate/events: ^13.0
- illuminate/routing: ^13.0
- illuminate/support: ^13.0
- illuminate/validation: ^13.0
Requires (Dev)
- orchestra/testbench: 11.x-dev
- phpunit/phpunit: ^12.0
This package is auto-updated.
Last update: 2026-04-12 09:54:50 UTC
README
congraph/core is the foundation package for the Congraph ecosystem.
Responsibilities
- command bus and command validation dispatching
- data transfer objects (
Model,Collection, and related helpers) - exception types
- mapping and resolution helpers
- shared service provider and framework integration points
Most other Congraph packages depend on core.
Installation
composer require congraph/core congraph/contracts
Laravel package provider:
Key concepts
Command bus
Congraph uses command classes for operations such as:
- create
- update
- delete
- fetch
- get
CommandDispatcher performs:
- before-command events
- validator resolution
- command handling
- after-command events
DTO layer
The Model and Collection DTOs are used across packages for predictable API and repository output.
Exceptions
Important exception families include:
- validation failures
- not found failures
- bad request failures
These are intentionally mapped by laravel-api into HTTP exceptions.
Development
Install dependencies
cd /Users/nikolap/git/np/congraph/packages/core
composer update -W
Run tests
composer test
Contribution notes
- changes here affect the whole monorepo
- preserve backwards-compatible DTO behavior when possible
- add tests for command dispatch, validation mapping, and DTO normalization
- if you touch event naming or exception mapping, re-test dependent packages