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

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

sandrokeil/code-generator
=========================

Zend Framework 2 (ZF2) code generator which generates form and input filter depending on database or doctrine 2 meta data.

1635[3 issues](https://github.com/sandrokeil/CodeGenerator/issues)PHP

Since Mar 16Pushed 10y ago2 watchersCompare

[ Source](https://github.com/sandrokeil/CodeGenerator)[ Packagist](https://packagist.org/packages/sandrokeil/code-generator)[ RSS](/packages/sandrokeil-code-generator/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Code generator for Zend Framework 2
===================================

[](#code-generator-for-zend-framework-2)

> You want to concentrate on the important things in your project and do not waste time with standard goodies?

> You want surefire input filter and forms depending on your database or doctrine 2 meta data?

> You want forms and input filter that are universally used and combined?

> This module comes to the rescue!

[![Build Status](https://camo.githubusercontent.com/c38c49db2b1c3debb807ee1025fc04fb61f7aae2327a1d06de0f4ab22d510063/68747470733a2f2f7472617669732d63692e6f72672f73616e64726f6b65696c2f436f646547656e657261746f722e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/sandrokeil/CodeGenerator)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/aaf92acc9ae0b7b828e599727797fcb7da4f5b3ccbf123cc3d7b5a0138426cc4/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f73616e64726f6b65696c2f436f646547656e657261746f722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/sandrokeil/CodeGenerator/?branch=master)[![Coverage Status](https://camo.githubusercontent.com/be250e3335853df35eeddca7a2fb8678fe99f2f4ba2462ca6922702c678187a8/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f73616e64726f6b65696c2f436f646547656e657261746f722f62616467652e706e67)](https://coveralls.io/r/sandrokeil/CodeGenerator)[![HHVM Status](https://camo.githubusercontent.com/b66c4f2ca15d548e634a50756640417e029b7423e228e8871755bdb34a4f1fed/687474703a2f2f6868766d2e683463632e64652f62616467652f73616e64726f6b65696c2f636f64652d67656e657261746f722e737667)](http://hhvm.h4cc.de/package/sandrokeil/code-generator)[![SensioLabsInsight](https://camo.githubusercontent.com/7ef7a14bf730cf0f95a9fb2f0eebe46ccc9b046e6b9cf74a0533d677679001fd/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f39363464306534352d356433352d346635322d623336352d6262303435383235616333392f6d696e692e706e67)](https://insight.sensiolabs.com/projects/964d0e45-5d35-4f52-b365-bb045825ac39)[![Latest Stable Version](https://camo.githubusercontent.com/7d36c4d9d9a35b0ecdffeb29301962cfca3b35e7cc90e1c75fedc6e43045bc8c/68747470733a2f2f706f7365722e707567782e6f72672f73616e64726f6b65696c2f636f64652d67656e657261746f722f762f737461626c652e706e67)](https://packagist.org/packages/sandrokeil/code-generator)[![Dependency Status](https://camo.githubusercontent.com/bfe51cdb76cb0ff5c7ee114111cb9966d46f5d84562870e40b94d593e7f63189/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3534303337316230656162363261313332383030303134612f62616467652e737667)](https://www.versioneye.com/user/projects/540371b0eab62a132800014a)[![Total Downloads](https://camo.githubusercontent.com/4bbc35df5a0d60752e9f93f005c1f99e040d4eb50f6620bb524ac304f533e7c3/68747470733a2f2f706f7365722e707567782e6f72672f73616e64726f6b65696c2f636f64652d67656e657261746f722f646f776e6c6f6164732e706e67)](https://packagist.org/packages/sandrokeil/code-generator)[![License](https://camo.githubusercontent.com/fc282857dab4698452087ea1aef17e2c3ca9f0342291739a23e323c7b80e3846/68747470733a2f2f706f7365722e707567782e6f72672f73616e64726f6b65696c2f636f64652d67656e657261746f722f6c6963656e73652e706e67)](https://packagist.org/packages/sandrokeil/code-generator)

Zend Framework 2 code generator which generates form and input filter depending on database or doctrine 2 meta data. Create new forms and input filter in seconds with your namespace and parent class.

- **Great foundations.** Based on [Zend Framework 2](https://github.com/zendframework/zf2) and [Doctrine 2](https://github.com/doctrine/doctrine2)
- **Every change is tracked**. Want to know whats new? Take a look at [CHANGELOG.md](CHANGELOG.md)
- **Listen to your ideas.** Have a great idea? Bring your tested pull request or open a new issue. See [CONTRIBUTING.md](CONTRIBUTING.md)

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

[](#installation)

Installation of this module uses composer. For composer documentation, please refer to [getcomposer.org](http://getcomposer.org/).

Put the following into your composer.json

```
{
    "require": {
        "sandrokeil/code-generator": "dev-master"
    }
}

```

Then add `Sake\CodeGenerator` to your `./config/application.config.php`.

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

[](#documentation)

Console Doctrine 2
------------------

[](#console-doctrine-2)

Before you can use these doctrine commands please make sure you have enabled and configured your [cli-config.php](http://docs.doctrine-project.org/en/latest/reference/tools.html#configuration) for doctrine. For a common example see [cli-config.php](cli-config.php) of this repository.

```
zf:generate-form [--filter="..."] [--force] [--from-database] [--extend[="..."]] [--namespace[="..."]] [--num-spaces[="..."]] dest-path

```

Console Zend Framework 2
------------------------

[](#console-zend-framework-2)

Generated Classes
-----------------

[](#generated-classes)

At the moment the following classes can be generated:

- ZF2 Form Fieldsets (Collections)
- ZF2 Input Filter

Known limitations
-----------------

[](#known-limitations)

Unfortunately is it necessary to change some generated code lines by yourself, because some information is currently missing to make some classes working out of the box.

### Form Fieldsets (Collections)

[](#form-fieldsets-collections)

If you have relations (foreign keys) defined in your entities the `\DoctrineModule\Persistence\ObjectManagerAwareInterface`must be implemented by yourself. Additionally you must set `property` option for the name of the text which should be displayed in select box.

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

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

### Community

Maintainers

![](https://www.gravatar.com/avatar/58f3428ea5d86dde45a70842c5228d295ec37a493594d484bf1ed2552e85b791?d=identicon)[sandrokeil](/maintainers/sandrokeil)

---

Top Contributors

[![sandrokeil](https://avatars.githubusercontent.com/u/3597436?v=4)](https://github.com/sandrokeil "sandrokeil (3 commits)")[![dzoudzou](https://avatars.githubusercontent.com/u/2709249?v=4)](https://github.com/dzoudzou "dzoudzou (2 commits)")

### Embed Badge

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

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

###  Alternatives

[dillingham/nova-attach-many

Attach Many Nova field

2712.0M2](/packages/dillingham-nova-attach-many)[primal/color

Collection of classes for converting and manipulating colors

24506.7k5](/packages/primal-color)[faryshta/yii2-enum

Enum classes for Yii2 models and forms

15332.9k](/packages/faryshta-yii2-enum)[acsiomatic/device-detector-bundle

Symfony Bundle for https://github.com/matomo-org/device-detector

12183.6k](/packages/acsiomatic-device-detector-bundle)[braunson/laravel-html5-forms

This package extends Laravel's FormBuilder to include some (soon all) HTML5 elements

851.1k](/packages/braunson-laravel-html5-forms)

PHPackages © 2026

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