thesis/grpc-server-reflection

gRPC server reflection protocol implementation.

Maintainers

Package info

github.com/thesis-php/grpc-server-reflection

pkg:composer/thesis/grpc-server-reflection

Fund package maintenance!

www.tinkoff.ru/cf/5MqZQas2dk7

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

0.1.0 2026-04-05 07:57 UTC

This package is auto-updated.

Last update: 2026-04-05 08:20:12 UTC


README

gRPC server reflection protocol implementation

Installation

composer require thesis/grpc-server-reflection

Usage

Reflection v1 only (registerV1)

Use this when you only need reflection v1.

<?php

declare(strict_types=1);

use Thesis\Grpc\Server;
use Thesis\Grpc\Server\Reflection;

$server = new Server\Builder()
    ->withServices(/* your service registries */)
    ->build();

Reflection\registerV1($server);

$server->start();

Reflection v1 + v1alpha (registerV1Alpha)

Use this when you need both reflection endpoints: v1 and v1alpha (deprecated).

<?php

declare(strict_types=1);

use Thesis\Grpc\Server;
use Thesis\Grpc\Server\Reflection;

$server = new Server\Builder()
    ->withServices(/* your service registries */)
    ->build();

Reflection\registerV1Alpha($server);

$server->start();

Why

Server Reflection lets gRPC clients discover services and schemas at runtime, without local .proto files.

This is useful for:

  • ad-hoc debugging and smoke checks when proto files are not locally available;
  • interactive API exploration;
  • fast integration checks in CI and local development.

With reflection enabled you can use tools like grpcurl and grpcui.

grpcurl

# List all services
grpcurl -plaintext localhost:50051 list

# Show methods for a service
grpcurl -plaintext localhost:50051 describe thesis.echos.api.v1.EchoService

grpcui

grpcui -plaintext localhost:50051

Then open the URL printed by grpcui in your browser.