PHPackages                             beloys/stub-grpc - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. beloys/stub-grpc

ActiveLibrary[Testing &amp; Quality](/categories/testing)

beloys/stub-grpc
================

Mock for gRPC

0.0.1(6y ago)065.6k↓70.3%PHPPHP &gt;=7.1CI failing

Since Apr 3Pushed 6y ago1 watchersCompare

[ Source](https://github.com/beloys/stub-grpc)[ Packagist](https://packagist.org/packages/beloys/stub-grpc)[ RSS](/packages/beloys-stub-grpc/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependencies (4)Versions (2)Used By (0)

Mock for gRPC requests
======================

[](#mock-for-grpc-requests)

Mocks for gRPC clients with PHPStorm meta

### Installation

[](#installation)

```
composer require beloys/stub-grpc --dev

```

### Examples

[](#examples)

```
use Beloys\StubGrpc\StubGrpc;
use Grpc\Health\V1\HealthCheckResponse;
use Grpc\Health\V1\HealthCheckRequest;
use Grpc\Health\V1\HealthClient;

$mock = StubGrpc::make(HealthClient::class, [
    '/grpc.health.v1.Health/Check' => new HealthCheckResponse(['status' => HealthCheckResponse\ServingStatus::SERVING]),
]);

$mock = StubGrpc::make(HealthClient::class, [
    '/grpc.health.v1.Health/Check' => function(HealthCheckRequest $in){
        return [new HealthCheckResponse(), null];
    },
]);

$mock = (new StubGrpc(HealthClient::class))
  ->methodWillReturn('/cyberxpert.grpc.user.User/ViewByUuid', new HealthCheckResponse(), (object)['status' => 1])
  ->build();
```

### Tests

[](#tests)

```
composer tests

```

###  Health Score

27

—

LowBetter than 46% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2329d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/af2f3891bb1951813defd92c19377a823004d167fb734ee03298be17e9054705?d=identicon)[beloys](/maintainers/beloys)

---

Top Contributors

[![beloys](https://avatars.githubusercontent.com/u/13886338?v=4)](https://github.com/beloys "beloys (2 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/beloys-stub-grpc/health.svg)

```
[![Health](https://phpackages.com/badges/beloys-stub-grpc/health.svg)](https://phpackages.com/packages/beloys-stub-grpc)
```

###  Alternatives

[google/gax

Google API Core for PHP

268121.1M633](/packages/google-gax)[googleads/google-ads-php

Google Ads API client for PHP

3528.8M15](/packages/googleads-google-ads-php)[clarifai/clarifai-php-grpc

Clarifai PHP gRPC client

1229.9k](/packages/clarifai-clarifai-php-grpc)[temporal/sdk

Temporal SDK

4163.2M27](/packages/temporal-sdk)[google/cloud

Google Cloud Client Library

1.2k16.9M57](/packages/google-cloud)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

86337.5k](/packages/flow-php-flow)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
