pilotphp / contracts
Stable public contracts for the PilotPHP Agent-First framework ecosystem.
Requires
- php: ^8.5
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.75
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^11.5
This package is not auto-updated.
Last update: 2026-07-27 21:11:36 UTC
README
Stable public contracts for the PilotPHP Agent-First framework ecosystem.
This package defines interfaces, value objects, and enums only. It contains no runtime implementations, and depends on nothing beyond PHP itself.
Scope
pilotphp/contracts exists to give every other PilotPHP package (core,
config, container, runtime, runtime-roadrunner, grpc, blueprint,
and so on) a shared, transport-neutral vocabulary to program against,
without forcing them to depend on each other or on any concrete
implementation.
What belongs here:
- Interfaces that multiple PilotPHP packages need to agree on.
- Immutable value objects that describe build-time or lifecycle data.
- Enums for closed sets of values (e.g. service scopes).
What does not belong here:
- Runtime implementations of any kind.
- Anything specific to a transport or technology (HTTP, gRPC, RoadRunner, FrankenPHP, a specific DI container, an ORM, Blueprint).
- Speculative abstractions without an immediate, concrete consumer.
See AGENTS.md for the contribution rules that keep this package minimal and stable, and the docs/ directory for the full public API reference, compatibility policy, and lifecycle documentation.
Installation
composer require pilotphp/contracts
Requires PHP 8.5+.
Namespaces
| Namespace | Contents |
|---|---|
PilotPHP\Contracts\Package | Package description and registration |
PilotPHP\Contracts\Kernel | Application entry point lifecycle |
PilotPHP\Contracts\Container | Read-only service resolution |
PilotPHP\Contracts\Config | Typed configuration access |
PilotPHP\Contracts\Runtime | Transport-neutral invocation handling |
Development
make install # composer install
make check # validate + cs-check + analyse + test
Individual steps: make test, make analyse, make cs-check, make cs-fix,
make validate.
Repository
This is a standalone Git repository, one of many single-purpose repositories that make up PilotPHP. There is no monorepo; each PilotPHP package is its own repository and its own Composer package.