pilotphp / grpc
Transport-domain gRPC method declarations, compiled method-map, and RoadRunner-independent unary RPC application for the PilotPHP Agent-First framework.
0.1.4
2026-08-02 19:19 UTC
Requires
- php: ^8.5
- pilotphp/contracts: ^0.1.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.88
- phpstan/phpstan: ^2.1
- phpstan/phpstan-phpunit: ^2.0
- phpunit/phpunit: ^11.5
README
Transport-domain gRPC package for the PilotPHP Agent-First framework.
Declares unary gRPC methods, compiles them into a deterministic method-map
artifact, loads that artifact at worker boot, and handles transport-neutral
GrpcCall values through the contracts kernel boundary — without depending on
RoadRunner, pilotphp/operation, or pilotphp/container.
Requirements
- PHP 8.5+
pilotphp/contracts^0.1.2
Install
composer require pilotphp/grpc
Quick vertical slice
use PilotPHP\Grpc\Artifact\GrpcArtifactLoader;
use PilotPHP\Grpc\Runtime\GrpcApplication;
use PilotPHP\Grpc\Runtime\GrpcCall;
$map = (new GrpcArtifactLoader())->loadFromBytes($trustedArtifactBytes);
$app = new GrpcApplication($map, $kernel, $container);
$result = $app->handle(new GrpcCall(
serviceName: 'acme.users.v1.UserService',
methodName: 'GetUser',
request: $decodedProtobufRequest,
));
Host runtimes own KernelInterface::boot() / reset() / shutdown().
GrpcApplication only calls invoke().
Documentation
- architecture.md
- declarations.md
- protobuf-boundary.md
- compilation.md
- artifact-schema.md
- runtime.md
- status-and-errors.md
- metadata-deadlines-cancellation.md
- integration.md
- streaming-roadmap.md
- security.md
Quality
composer validate --strict
composer update --prefer-stable
composer check
License
MIT