Twig as our template engine

These requests for comments/change have lead to an implemented feature that has been successfully merged into the 3.1/Ascraeus branch. Everything listed in this forum will be available in phpBB 3.1.
Post Reply
User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: [RFC] Twig as our template engine

Post by EXreaction »

Greater quantity of documentation is not the same as better. They have much more documentation because their system is significantly more powerful and there are a lot more things developers need to know about to use the system.

User avatar
callumacrae
Former Team Member
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: [RFC] Twig as our template engine

Post by callumacrae »

EXreaction wrote:Greater quantity of documentation is not the same as better. They have much more documentation because their system is significantly more powerful and there are a lot more things developers need to know about to use the system.
In this case… well, yes, it is.

EDIT: I just noticed the DEFINE weirdness. Lol.
Made by developers, for developers!
My blog

User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: [RFC] Twig as our template engine

Post by EXreaction »

Currently I'm working replacing our template engine with Twig for 3.1. The reason this is being worked on now is that we have run into many, and still have some, critical bugs in the existing template system, and due to the old template system's design, bug fixing is a very hard and slow process.

Currently, I have almost all phpBB syntax working in Twig, I think the only remaining items are getting includes to do proper tree checking depending upon what file is being included and what file its being included from, events, includejs, and php/includephp.

With the implementation I'm working on, all Twig syntax will be usable in our templates as well (using the normal {% %} block identifiers for Twig).

https://github.com/phpbb/phpbb3/pull/1470
http://tracker.phpbb.com/browse/PHPBB3-11598

User avatar
RMcGirr83
Registered User
Posts: 360
Joined: Fri Mar 09, 2007 1:51 am
Contact:

Re: [RFC] Twig as our template engine

Post by RMcGirr83 »

Not to steal anyone's thunder but shouldn't the collective "we" be focusing on getting the current bugs fixed first

http://tracker.phpbb.com/issues/?jql=pr ... %3D%20Open

last I knew I thought 3.1 was feature frozen. I do believe you guys are making more work for yourselves when twig could have been implemented in a major release of 3.1 instead of holding it up.

There are still 9 blockers as far as I can tell

http://tracker.phpbb.com/issues/?jql=pr ... %20Blocker
Do not hire Christian Bullock he won't finish the job and will keep your money

sajaki
Registered User
Posts: 86
Joined: Mon Jun 21, 2010 8:28 pm

Re: [RFC] Twig as our template engine

Post by sajaki »

EXreaction wrote:Currently I'm working replacing our template engine with Twig for 3.1.
+1

It will take some getting used to but a more modern template engine is welcome news :) .

User avatar
EXreaction
Registered User
Posts: 1555
Joined: Sat Sep 10, 2005 2:15 am

Re: [RFC] Twig as our template engine

Post by EXreaction »

RMcGirr83 wrote:Not to steal anyone's thunder but shouldn't the collective "we" be focusing on getting the current bugs fixed first

http://tracker.phpbb.com/issues/?jql=pr ... %3D%20Open

last I knew I thought 3.1 was feature frozen. I do believe you guys are making more work for yourselves when twig could have been implemented in a major release of 3.1 instead of holding it up.

There are still 9 blockers as far as I can tell

http://tracker.phpbb.com/issues/?jql=pr ... %20Blocker
Two of those blockers are related to the template engine, which is why I started exploring using Twig and replacing our template engine. After spending some time exploring it and seeing it wouldn't be all that difficult to do and estimating that the time required to do it wouldn't be all that great, I decided it would be better to get a proper working template engine rather than patch and hack the old one continuously (seeing all the major bugs we've had and currently have for it, I think it's very likely we would find even more if we continue using it, ultimately spending more resources fixing it than switching to Twig now).

keith10456
Registered User
Posts: 523
Joined: Sat Apr 22, 2006 10:29 pm
Contact:

Re: [RFC] Twig as our template engine

Post by keith10456 »

sajaki wrote:
EXreaction wrote:Currently I'm working replacing our template engine with Twig for 3.1.
+1

It will take some getting used to but a more modern template engine is welcome news :) .
+1

code reader
Registered User
Posts: 653
Joined: Wed Sep 21, 2005 3:01 pm

Re: [RFC] Twig as our template engine

Post by code reader »

i must admit i did not read this whole thread - i know it's bad form, but the alternative is not to say anything, and there is a slight chance my comment will be useful:

i do not think it's a good idea to "replace" the template engine. this will basically force everyone to completely throw away all existing skins and designs, and will cause further delay.

however, allowing for alternative template engine, maybe controlled by some flag in the "skin" object may be possible. if it works, it may allow slow and gradual phasing out of the homegrown template engine - much better than cold-turkey. (think "plug-in" or "pluggable" template engine).

if this idea was suggested and discussed above in one of the 5 pages i did not read, please accept my apologies.

peace.

Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 373
Joined: Thu Sep 16, 2004 9:02 am
Contact:

Re: [RFC] Twig as our template engine

Post by Paul »

I suggest you actually read the topic, or atleast the most recent posts;
EXreaction wrote:Currently, I have almost all phpBB syntax working in Twig, I think the only remaining items are getting includes to do proper tree checking depending upon what file is being included and what file its being included from, events, includejs, and php/includephp.

Danielx64
Registered User
Posts: 304
Joined: Mon Feb 08, 2010 3:42 am

Re: [RFC] Twig as our template engine

Post by Danielx64 »

Guys,

Didn't you say that you were going to make phpBB 3.1 so that we can use mods written for phpBB 3.0? If you move to this new framework then we are going to be *beep* as there many changes that would be required.

What happen to backward compatibility‎?

No wonder why people are moving away or won't be upgrading.

Post Reply