PHPackages                             gossi/php-code-generator - 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. gossi/php-code-generator

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

gossi/php-code-generator
========================

Toolset for generating PHP code

v0.5(8y ago)148203.9k↑13.6%42[11 issues](https://github.com/phpowermove/php-code-generator/issues)[2 PRs](https://github.com/phpowermove/php-code-generator/pulls)20Apache2PHPPHP &gt;=5.6CI failing

Since Nov 5Pushed 4y ago13 watchersCompare

[ Source](https://github.com/phpowermove/php-code-generator)[ Packagist](https://packagist.org/packages/gossi/php-code-generator)[ RSS](/packages/gossi-php-code-generator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (13)Used By (20)

PHP Code Generator
==================

[](#php-code-generator)

[![License](https://camo.githubusercontent.com/0d85944c80abdf09f27040361d3e9479f87d9dedb1d8d84b5d9c8d7dceeff9a3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f676f7373692f7068702d636f64652d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gossi/php-code-generator)[![Latest Stable Version](https://camo.githubusercontent.com/bed93d19d0675845611626c71973410a56308bd147b40d10962835d574c713e6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f676f7373692f7068702d636f64652d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/gossi/php-code-generator)[![Total Downloads](https://camo.githubusercontent.com/ed4184afd82bb2c52d2c2ea62482f4992ac4ed5a59098a1cb4804a698c413d39/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f676f7373692f7068702d636f64652d67656e657261746f722e7376673f7374796c653d666c61742d73717561726526636f6c6f72423d303037656336)](https://packagist.org/packages/gossi/php-code-generator)
[![Build Status](https://camo.githubusercontent.com/d2dd1bb45b3404cd4c2b5511fb47b01dcb961945c580253b99c2710786a2bcdf/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f6275696c642f672f676f7373692f7068702d636f64652d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/gossi/php-code-generator)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/8a83248666c9a1b15afdefff764b088fe3d61e94173f22d6c0e30babc988a17e/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f676f7373692f7068702d636f64652d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/gossi/php-code-generator)[![Code Coverage](https://camo.githubusercontent.com/4c98706ba8a64291420d1d6f917679c4138b11ee9b5b7c41e06fcb3d901ee931/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f676f7373692f7068702d636f64652d67656e657261746f722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/gossi/php-code-generator)

This library provides some tools that you commonly need for generating PHP code.

Installation
------------

[](#installation)

Install via Composer:

```
composer require gossi/php-code-generator

```

Documentation
-------------

[](#documentation)

Documentation is available at

Contributing
------------

[](#contributing)

Feel free to fork and submit a pull request (don't forget the tests) and I am happy to merge.

References
----------

[](#references)

- This project is a spin-off of the older [schmittjoh/cg-library](https://github.com/schmittjoh/cg-library) library.

###  Health Score

42

—

FairBetter than 90% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity49

Moderate usage in the ecosystem

Community39

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 61.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 ~111 days

Recently: every ~156 days

Total

10

Last Release

2844d ago

PHP version history (3 changes)v0.1PHP &gt;=5.4.0

v0.2PHP &gt;=5.4

v0.5PHP &gt;=5.6

### Community

Maintainers

![](https://www.gravatar.com/avatar/0b1ca3beb32834f0f6a4b66d7a695ecc01397aa92e9a97bd0ba5dd8aa14e0c6e?d=identicon)[gossi](/maintainers/gossi)

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

---

Top Contributors

[![gossi](https://avatars.githubusercontent.com/u/283700?v=4)](https://github.com/gossi "gossi (103 commits)")[![schmittjoh](https://avatars.githubusercontent.com/u/197017?v=4)](https://github.com/schmittjoh "schmittjoh (49 commits)")[![Ocramius](https://avatars.githubusercontent.com/u/154256?v=4)](https://github.com/Ocramius "Ocramius (3 commits)")[![nmpolo](https://avatars.githubusercontent.com/u/1206982?v=4)](https://github.com/nmpolo "nmpolo (2 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (2 commits)")[![RobinGeuze](https://avatars.githubusercontent.com/u/8234736?v=4)](https://github.com/RobinGeuze "RobinGeuze (1 commits)")[![romanmatena](https://avatars.githubusercontent.com/u/164995?v=4)](https://github.com/romanmatena "romanmatena (1 commits)")[![Seldaek](https://avatars.githubusercontent.com/u/183678?v=4)](https://github.com/Seldaek "Seldaek (1 commits)")[![sidux](https://avatars.githubusercontent.com/u/1242225?v=4)](https://github.com/sidux "sidux (1 commits)")[![hhashimoto](https://avatars.githubusercontent.com/u/1752906?v=4)](https://github.com/hhashimoto "hhashimoto (1 commits)")[![marcj](https://avatars.githubusercontent.com/u/450980?v=4)](https://github.com/marcj "marcj (1 commits)")[![moufmouf](https://avatars.githubusercontent.com/u/1290952?v=4)](https://github.com/moufmouf "moufmouf (1 commits)")[![pulzarraider](https://avatars.githubusercontent.com/u/960844?v=4)](https://github.com/pulzarraider "pulzarraider (1 commits)")

---

Tags

code-generationcode-generatorphpcode-generation

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/gossi-php-code-generator/health.svg)

```
[![Health](https://phpackages.com/badges/gossi-php-code-generator/health.svg)](https://phpackages.com/packages/gossi-php-code-generator)
```

###  Alternatives

[jms/cg

Toolset for generating PHP code

15615.8M8](/packages/jms-cg)[php-soap/ext-soap-engine

An ext-soap engine implementation

443.2M7](/packages/php-soap-ext-soap-engine)

PHPackages © 2026

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