On 28 Feb 2011, at 15:48, Robert Campbell wrote: > I've been concerned about this for a while now. I tried to remove twig from a > dummy project around the time of PR4. > I realised it was impossible without editing the framework files. I think > someone shared by concerns because i'm sure i recall someone mentioning it > here, but as far as i can see, nothing has been done about it. > > Why is the Framework bundle using it twig? > https://github.com/symfony/symfony/tree/master/src/Symfony/Bundle/FrameworkBundle/Resources/views/Exception > > shouldn't it default to php and then twig would be optional. > > With things the way they are now, I cannot completely strip twig away from a > project and that is one of the only turn offs i have for SF2 right now.
If PHP templates were the default, there'd still be a dependency on the Symfony PHP templating component - it's not "raw" PHP. :) I think it's reasonable for some components to have a dependency on Twig. Symfony2's not just about providing useful standalone components, it's also about promoting best practice and standards, and Twig is one of those. It's an excellent and admirable thing to try to make all the components completely standalone with no dependencies, but I think we should be pragmatic about it. It shouldn't come at the expense of making a simple and effective full-stack web framework. To me, that's the primary goal of Symfony2; it's what we hope most people will use it for, and we should be careful not to add so much abstraction and complexity that it makes Symfony2 harder to understand and learn for the majority of people who will only use it that way. I don't think we're in that situation yet, mind you, so it's a cautionary note not a complaint about how it currently is! That said, I'm already edgy about having too much choice. There are 3 configuration languages - it's presented as a choice and a freedom, but because beginners will use YAML, and 3rd party bundles have to use XML, it doubles the amount of learning a user has to do before they can understand their own projects. The same goes for templating. Right now, because both are allowed, everyone has to learn both the PHP template component and Twig. That's not freedom and choice, that's twice as much to learn just so you can debug your own project. If it was up to me, I'd pick one configuration format, and one templating component and if people want an alternative, they can pick a different Symfony2 distribution. Fortunately for everyone, it's not up to me ;) -- Matt -- If you want to report a vulnerability issue on symfony, please send it to security at symfony-project.com You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en
