PHPackages                             cstabor/protoc-gen-php - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. cstabor/protoc-gen-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

cstabor/protoc-gen-php
======================

protoc generator plugin for PECL ProtocolBuffers

0.3(8y ago)05BSD-2-ClausePHPPHP &gt;=5.3.3

Since Feb 11Pushed 8y ago1 watchersCompare

[ Source](https://github.com/cstabor/protoc-gen-php)[ Packagist](https://packagist.org/packages/cstabor/protoc-gen-php)[ Docs](https://github.com/chobie/protoc-gen-php)[ RSS](/packages/cstabor-protoc-gen-php/feed)WikiDiscussions master Synced yesterday

READMEChangelog (3)Dependencies (5)Versions (5)Used By (0)

protoc-gen-php
==============

[](#protoc-gen-php)

protoc php generator plugin .

[![Build Status](https://camo.githubusercontent.com/374946cfa78df9a0d24f010a9b74964902cf181dde35d9871505fc84dbe3cf99/68747470733a2f2f7472617669732d63692e6f72672f63686f6269652f70726f746f632d67656e2d7068702e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/chobie/protoc-gen-php)

Installation
============

[](#installation)

you can install protoc-gen-php with composer command.

```
# add protocolbuffers/protoc-gen-php entry to your global composer.json ($HOME/.composer/composer.json)
{
    "require": {
        "cstabor/protoc-gen-php": "0.3"
    }
}

# install with composer
composer global install
# set PATH (add this line to your .bashrc or .zshrc.)
export PATH=$HOME/.composer/vendor/bin/:$PATH

```

Usage
=====

[](#usage)

```
# this will link composer/bin/protoc-gen-php to /usr/local/bin/protoc-gen-php
protoc --php_out= -I. person.proto

# you can also specify the command.
protoc --plugin=vendor/bin/protoc-gen-php --php_out= -I. person.proto

```

Features
--------

[](#features)

### Yaml based insertion

[](#yaml-based-insertion)

protoc has comment based `insertion point` mechanism. it's very usefull to customize generated message. but you need to write custom plugin when using that. protoc-gen-php has pragmatic feature which will check `.protoc.php.yml` and insert contents when matched.

see

### Environments

[](#environments)

you can override protoc-gen-php behavior with environemnts.

keydescriptionexamplePACKAGEover ride package name. expects dot delimited package namePACKAGE=chobie.ioPEAR\_STYLEdon't use namespace.PEAR\_STYLE=1requirements
------------

[](#requirements)

- [php-protocolbuffers](https://github.com/chobie/php-protocolbuffers)

License
-------

[](#license)

new BSD License

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 89.6% 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 ~447 days

Total

4

Last Release

3131d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1938af4785878fa6f22b3c92233701be0f5fec4da5618e185799729c225caa1d?d=identicon)[cstabor](/maintainers/cstabor)

---

Top Contributors

[![chobie](https://avatars.githubusercontent.com/u/195038?v=4)](https://github.com/chobie "chobie (60 commits)")[![cstabor](https://avatars.githubusercontent.com/u/3190851?v=4)](https://github.com/cstabor "cstabor (4 commits)")[![ossinkine](https://avatars.githubusercontent.com/u/2588533?v=4)](https://github.com/ossinkine "ossinkine (2 commits)")[![bitdeli-chef](https://avatars.githubusercontent.com/u/3092978?v=4)](https://github.com/bitdeli-chef "bitdeli-chef (1 commits)")

---

Tags

protocol buffersprotoc

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cstabor-protoc-gen-php/health.svg)

```
[![Health](https://phpackages.com/badges/cstabor-protoc-gen-php/health.svg)](https://phpackages.com/packages/cstabor-protoc-gen-php)
```

###  Alternatives

[cognesy/instructor-php

The complete AI toolkit for PHP: unified LLM API, structured outputs, agents, and coding agent control

310107.9k1](/packages/cognesy-instructor-php)[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

96374.6k23](/packages/friendsoftypo3-content-blocks)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[protocolbuffers/protoc-gen-php

protoc generator plugin for PECL ProtocolBuffers

529.1k](/packages/protocolbuffers-protoc-gen-php)[netgen/layouts-core

Netgen Layouts enables you to build and manage complex web pages in a simpler way and with less coding. This is the core of Netgen Layouts, its heart and soul.

3689.4k10](/packages/netgen-layouts-core)[altis/local-server

Local Server module for Altis

18208.4k2](/packages/altis-local-server)

PHPackages © 2026

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