PHPackages                             coolstudio/nyx-protobuf - 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. [API Development](/categories/api)
4. /
5. coolstudio/nyx-protobuf

ActiveLibrary[API Development](/categories/api)

coolstudio/nyx-protobuf
=======================

Generated PHP bindings for the Nyx backup platform Protocol Buffers contract (backup.v1). Source of truth lives in the protobuf submodule.

v0.1.1(today)00MITShellPHP &gt;=8.1CI passing

Since Jun 10Pushed todayCompare

[ Source](https://github.com/CS-Nyx2/protobuf-php)[ Packagist](https://packagist.org/packages/coolstudio/nyx-protobuf)[ Docs](https://github.com/CS-Nyx2/protobuf-php)[ RSS](/packages/coolstudio-nyx-protobuf/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (1)Versions (3)Used By (0)

nyx-protobuf
============

[](#nyx-protobuf)

Generated **PHP bindings** for the Nyx backup platform Protocol Buffers contract (`backup.v1`). The `.proto` source of truth is **not** copied here — it is pulled in as a git submodule from the upstream [`CS-Nyx2/protobuf`](https://github.com/CS-Nyx2/protobuf) module, and the PHP classes in [`src/`](src) are generated from it.

This package exists so the Laravel API (and any other PHP consumer) can depend on the contract via Composer / Packagist instead of vendoring `protoc` output by hand.

Layout
------

[](#layout)

```
protobuf-php/
├── protobuf/                 # git submodule -> CS-Nyx2/protobuf (the .proto contract)
├── src/                      # generated PHP (committed; PSR-4 root "CoolStudio\")
│   └── CoolStudio/Nyx/V1/... #   message + enum classes (CoolStudio\Nyx\V1\…)
│       └── Meta/...          #   descriptor metadata (CoolStudio\Nyx\V1\Meta\…)
├── buf.gen.yaml              # PHP-only codegen template (out: ./src)
├── scripts/generate.sh       # regenerate src/ (buf if present, else protoc)
├── Makefile                  # make generate / make check / make submodule
├── composer.json             # Packagist manifest (PSR-4 autoload)
└── .github/workflows/        # ci.yml + sync-protobuf.yml + tag-release.yml

```

The generated code is committed on purpose: Packagist installs straight from a git tag with no build step, so consumers must receive ready-to-autoload PHP.

How releases happen (automated)
-------------------------------

[](#how-releases-happen-automated)

You normally never touch this repo by hand. Contract changes flow through to a published Composer version end-to-end:

1. **Upstream proto change.** `CS-Nyx2/protobuf` validates a `.proto` change (buf lint/build/breaking) and, on success, sends a `repository_dispatch`(`protobuf-updated`) here.
2. **Regenerate** — [`sync-protobuf.yml`](.github/workflows/sync-protobuf.yml)pins the submodule to that validated commit, runs `make generate`, and commits the regenerated `src/` (plus the bumped submodule pointer) straight to `main`.
3. **Validate** — [`ci.yml`](.github/workflows/ci.yml) runs on the new `main`commit: `composer validate --strict`, a generated-code drift check, a PHP lint, and an autoload smoke test.
4. **Tag** — when CI succeeds, [`tag-release.yml`](.github/workflows/tag-release.yml)fires (via `workflow_run`). If any `*.php` or `composer.json` changed since the last `vX.Y.Z` tag, it patch-bumps and pushes a new tag. Doc-only or CI-only pushes don't cut a release.
5. **Publish** — Packagist's own GitHub webhook sees the new tag and refreshes the package. Nothing in this repo pings the Packagist API; pushing the tag *is* the release.

So a validated upstream proto change becomes a new Composer version with no human in the loop. The manual steps below are escape hatches: local iteration, and cutting a minor/major version (the automation only ever patch-bumps).

Using the library (consumers)
-----------------------------

[](#using-the-library-consumers)

```
composer require coolstudio/nyx-protobuf
```

```
use CoolStudio\Nyx\V1\BackupTask;
use CoolStudio\Nyx\V1\TaskStatus;

$task = new BackupTask();
$task->setStatus(TaskStatus::TASK_STATUS_PENDING);
```

The only runtime dependency is the official [`google/protobuf`](https://packagist.org/packages/google/protobuf) library. For better performance you may optionally install the native `protobuf` PECL extension; it is not required.

Regenerating the bindings by hand (maintainers)
-----------------------------------------------

[](#regenerating-the-bindings-by-hand-maintainers)

In normal operation `sync-protobuf.yml` does this for you (see above). Do it locally only to iterate on the codegen template, debug drift, or recover if the automation is wedged. You can also trigger the same job from the GitHub Actions tab via **Run workflow** (Sync protobuf), optionally passing a specific proto commit SHA.

Prerequisites: `protoc` (or [`buf`](https://buf.build)). PHP support is built into `protoc`, so no extra plugin is needed.

```
git submodule update --init --recursive   # or: make submodule
make generate                             # rewrites src/ from protobuf/proto
```

To advance to a newer version of the contract, move the submodule pointer and regenerate:

```
git -C protobuf pull origin main
make generate
git add protobuf src
git commit -m "chore: regenerate against protobuf "
```

CI (`.github/workflows/ci.yml`) runs `scripts/generate.sh --check`, which regenerates into a temp dir and fails the build if `src/` has drifted from the proto contract — so a stale checkout can never be released. Once this commit lands on `main`, the tag-release automation publishes it like any other change.

Publishing to Packagist
-----------------------

[](#publishing-to-packagist)

The repository is already Packagist-ready; the prerequisites that live here are:

- a valid `composer.json` (`composer validate --strict` passes in CI),
- an OSI `LICENSE`,
- PSR-4 autoloading with the generated code committed under `src/`,
- SemVer git tags as the version source,
- `tag-release.yml` to cut those tags automatically once CI is green.

Packagist refreshes itself from its own GitHub webhook on every tag push, so — unlike the original design — **nothing in this repo calls the Packagist API.**There is no `release.yml` and no `PACKAGIST_*` secret.

One-time setup:

1. Push this folder to its own GitHub repo: `https://github.com/CS-Nyx2/protobuf-php`.
2. On [packagist.org](https://packagist.org), **Submit** that repository URL.
3. Enable the **GitHub service hook** (Packagist shows the exact steps) so each tag push auto-updates the package. This webhook is the *only* link to Packagist — the tag-release workflow just pushes the tag and the hook does the rest.
4. Add the `SUBMODULE_TOKEN` secret (below).

### Required CI secret

[](#required-ci-secret)

The `protobuf` submodule lives in the **private** `CS-Nyx2/protobuf` repo, so the workflows can't fetch it with the default `GITHUB_TOKEN`. Add one repository secret (Settings → Secrets and variables → Actions):

SecretUsed byWhat it is`SUBMODULE_TOKEN``ci.yml`, `sync-protobuf.yml`PAT with **read** access to `CS-Nyx2/protobuf` *and* **write** access to this repo. `ci.yml` uses it to fetch the private submodule; `sync-protobuf.yml` additionally uses it to push the regenerated bindings back to `main`. Fine-grained PAT (Contents: read on `protobuf`, read+write on `protobuf-php`), classic PAT with `repo` scope, or a GitHub App installation token.`tag-release.yml` needs no secret — it tags with the built-in `GITHUB_TOKEN`(`permissions: contents: write`) and never touches the submodule. (If `CS-Nyx2/protobuf` is later made public, drop `SUBMODULE_TOKEN` and the `token:` lines, though `sync-protobuf.yml` still needs write to push.)

### Cutting a release manually

[](#cutting-a-release-manually)

You rarely need to — a release tag is pushed automatically whenever CI passes on `main` with PHP/composer changes. Reach for a manual tag only to bump the minor or major version (the automation always patch-bumps the highest existing tag):

```
git tag v1.0.0
git push origin v1.0.0     # Packagist's GitHub hook picks it up
```

The next automated release then continues patch-bumping from `v1.0.0`. Packagist exposes the tag for `composer require` within moments of the push.

> **Note:** the package is published as `coolstudio/nyx-protobuf` (Packagist vendor `coolstudio`) by CoolStudio () under an MIT license. The GitHub URLs above still point at the `CS-Nyx2` org that hosts the repos.

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance100

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 85.7% 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

Every ~0 days

Total

2

Last Release

0d ago

### Community

Maintainers

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

---

Top Contributors

[![J4Wx](https://avatars.githubusercontent.com/u/3397311?v=4)](https://github.com/J4Wx "J4Wx (6 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

laravelbackupgRPCprotobufgeneratednyx

### Embed Badge

![Health badge](/badges/coolstudio-nyx-protobuf/health.svg)

```
[![Health](https://phpackages.com/badges/coolstudio-nyx-protobuf/health.svg)](https://phpackages.com/packages/coolstudio-nyx-protobuf)
```

###  Alternatives

[google/gax

Google API Core for PHP

268111.6M515](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

174112.8M64](/packages/google-common-protos)[googleads/google-ads-php

Google Ads API client for PHP

3478.1M11](/packages/googleads-google-ads-php)[temporal/sdk

Temporal SDK

4082.7M22](/packages/temporal-sdk)[clarifai/clarifai-php-grpc

Clarifai PHP gRPC client

1229.3k](/packages/clarifai-clarifai-php-grpc)[yoti/yoti-php-sdk

Yoti SDK for quickly integrating your PHP backend with Yoti

27565.3k1](/packages/yoti-yoti-php-sdk)

PHPackages © 2026

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