PHPackages                             demoniacdeath/cg - 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. demoniacdeath/cg

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

demoniacdeath/cg
================

Toolset for generating PHP code

2.1.1(6y ago)03.9k11Apache-2.0PHPPHP ^7.2

Since Jan 2Pushed 6y agoCompare

[ Source](https://github.com/DemoniacDeath/cg-library)[ Packagist](https://packagist.org/packages/demoniacdeath/cg)[ RSS](/packages/demoniacdeath-cg/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (1)Versions (9)Used By (1)

CG library
==========

[](#cg-library)

CG library provides a toolset for generating PHP code. Current version supports only PHP 7.2+

[![Build Status](https://camo.githubusercontent.com/b3f45a23a23f3306ca0547c2bcc5ee55b03fc1aac53e114e99e21be9b2a682fd/68747470733a2f2f7472617669732d63692e6f72672f44656d6f6e69616344656174682f63672d6c6962726172792e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/DemoniacDeath/cg-library)

Overview
--------

[](#overview)

This library provides some tools that you commonly need for generating PHP code. One of it's strength lies in the enhancement of existing classes with behaviors.

TODO: write more extensive documentation
----------------------------------------

[](#todo-write-more-extensive-documentation)

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 75.4% 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 ~428 days

Recently: every ~17 days

Total

8

Last Release

2244d ago

Major Versions

1.3.0 → 2.0.02020-01-16

PHP version history (3 changes)1.0.0PHP &gt;=5.3.0

2.0.0PHP ^7.4

2.0.1PHP ^7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/683e8181ee4aa17ee53133aa5b200f8a6b80d4542f33c4d713cdf98410f479cc?d=identicon)[DemoniacDeath](/maintainers/DemoniacDeath)

---

Top Contributors

[![schmittjoh](https://avatars.githubusercontent.com/u/197017?v=4)](https://github.com/schmittjoh "schmittjoh (52 commits)")[![jmcclell](https://avatars.githubusercontent.com/u/1063492?v=4)](https://github.com/jmcclell "jmcclell (4 commits)")[![Ocramius](https://avatars.githubusercontent.com/u/154256?v=4)](https://github.com/Ocramius "Ocramius (3 commits)")[![4n70w4](https://avatars.githubusercontent.com/u/38257723?v=4)](https://github.com/4n70w4 "4n70w4 (2 commits)")[![DemoniacDeath](https://avatars.githubusercontent.com/u/500550?v=4)](https://github.com/DemoniacDeath "DemoniacDeath (2 commits)")[![nmpolo](https://avatars.githubusercontent.com/u/1206982?v=4)](https://github.com/nmpolo "nmpolo (2 commits)")[![pulzarraider](https://avatars.githubusercontent.com/u/960844?v=4)](https://github.com/pulzarraider "pulzarraider (1 commits)")[![h4cc](https://avatars.githubusercontent.com/u/2981491?v=4)](https://github.com/h4cc "h4cc (1 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")[![Seldaek](https://avatars.githubusercontent.com/u/183678?v=4)](https://github.com/Seldaek "Seldaek (1 commits)")

---

Tags

code-generation

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/demoniacdeath-cg/health.svg)

```
[![Health](https://phpackages.com/badges/demoniacdeath-cg/health.svg)](https://phpackages.com/packages/demoniacdeath-cg)
```

###  Alternatives

[jms/cg

Toolset for generating PHP code

15615.8M8](/packages/jms-cg)[gossi/php-code-generator

Toolset for generating PHP code

148203.9k32](/packages/gossi-php-code-generator)

PHPackages © 2026

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