schmittjoh/cg-library — pull request #23 by gossi (2014-05-22 16:16:26+00:00)
Title: rewrite cg lib

Hey,

I needed a good codegen lib with traits and interface support. Your codegen lib was the best I found, though missing what I needed. I baked it in. All changes:

- requires php 5.4
- New Model, heavily composed from various traits
- Docblock Model, based on [phpDocumentor/ReflectionDocBlock](https://github.com/phpDocumentor/ReflectionDocBlock)
- More metadata for all models -> docblock generation from models
- New CodeGenerator class, that recursively generates docblock before code generation
- Some API changes, so incompatible with the current version
- Needs an update to a new major version (see below)
- Uhm, I have a different code style, so at best the code should be run through a code formatter

I would suggest a new name, because the library is hardly findable. New and better name probably is: `php-code-generator` or `php-codegen`. Because a new version is needed, I think this fits perfectly with a new name. How actively maintained is this project for this?

I will use my fork for my current project. I think I will find another round of issues when using it from a particular project. At least in the early days.

In a perfect world:
- Code from a file -> generate the model through reflection and regenerate the code again -> still is the same [still not the case]
- At best, a code formatter is run after code generation to properly deal with issues (e.g. indentation in code blocks). I started one as a nightly experiment: [gossi/php-code-formatter](https://github.com/gossi/php-code-formatter) (still is a bigger project than a nightly experiment :smile:)

Would love to hear feedback
gossi