congraph / contracts
Interfaces for Congraph CMS
v2.0.3
2026-04-11 08:34 UTC
Requires
- php: ^8.3 || ^8.4 || ^8.5
- illuminate/contracts: ^13.0
This package is auto-updated.
Last update: 2026-04-12 09:54:41 UTC
README
congraph/contracts contains the shared PHP interfaces used across the Congraph package ecosystem.
What this package provides
- repository contracts
- command/validation contracts
- cross-package interfaces that let packages depend on abstractions instead of concrete implementations
This package has no database schema, no Laravel service provider, and no runtime behavior by itself.
When to use it
Use this package when:
- a package needs to type-hint another package's repository or service
- you are adding a new reusable abstraction to Congraph
- you want to decouple command handlers, validators, or services from implementation details
Installation
composer require congraph/contracts
Package structure
Most interfaces live under namespaces like:
Congraph\Contracts\CoreCongraph\Contracts\EavCongraph\Contracts\FilesystemCongraph\Contracts\LocalesCongraph\Contracts\Workflows
Development
This package is intentionally small. Changes here ripple into the rest of the monorepo.
When editing contracts:
- update the interface
- verify all implementations in other packages still match
- run the dependent package test suites
Testing
This package does not currently ship its own PHPUnit suite. Validation happens through the dependent packages.
From the monorepo root:
composer test
Contribution notes
- keep interfaces minimal
- avoid framework-specific details in contracts
- prefer additive changes over breaking signature changes
- if a signature must change, update all implementing packages in the same branch