[RFC] Refactoring builders #182

willdurand opened this Issue Apr 23, 2012 · 6 comments


None yet

5 participants


As stated during the IRC meeting, we will postpone this part but we need to decide how to refactor these builders before a stable release even if alpha/beta versions will be probably released without these new builders.

The first option was TwigGenerator but some people (@beberlei, @themouette, and me) feel uncomfortable with that, because it will be hard to reproduce things like filters. Here is a old project which uses TwigGenerator: https://github.com/fzaninotto/Doctrine2ActiveRecord.


  • We need a proper Twig implementations for builders;
  • We need to reproduce all features including filters;
  • We need to decouple data, and views.


  • We will use Twig;
  • TwigGenerator is an option;
  • Mondator, feedbacks?;
  • Don't talk about AST.

The Plan

The first step is to rewrite simple builders using Twig, and to explain pros/cons.
If we are able to rewrite builders using Twig, let's go. Otherwise another option will be discussed.


I will write extra RFC, about what we can do with twig and behavior


Anything new about this?
In my opinion this would make our code much more readable, so I would really like to start building a prototype of the twig integration if you agree?


Sure! This issue isn't abandoned but in our last chat we considered it not to be a priority for 2.0 release.
So, go ahead and good luck!


Yes, this could help a lot to build clean code ;) et help to write behavior, but this is postponed to a 2.x version, unless someone do an awesome PR ;)

marcj commented Oct 4, 2013

@cristianoc72, which chat do you mean? can we read a log of it?

@marcj marcj self-assigned this Oct 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment