Continuing with the orig tpl inherits id mess, we have these 4+1 changesets:
r9823 (precursor)
r9839 (fix for 40515/8092)
r9847
r10150 (fix for 51285/8688)
r10460 (fix for 54505/8901)
Reverting the last two of these changesets on develop-olympus brings back bug 8688, and may be a good starting point for writing tests for this whole mess.
[RFC|Merged] Improved template engine
Re: [RFC|Accepted] Improved template engine
I am sufficiently happy with the state of the template engine to request review and merge. 3rd time is the charm, right?
https://github.com/phpbb/phpbb3/pull/171
https://github.com/p/phpbb3/commit/df46 ... 58dfb98927 makes bbcode engine use the template engine instead of duplicating the latter's code. It required addition of another public implementation function to the template class, and the template engine does a bit more work than bbcode engine needs.
I went through the diff and added documentation everywhere it was missing as well.
https://github.com/phpbb/phpbb3/pull/171
https://github.com/p/phpbb3/commit/df46 ... 58dfb98927 makes bbcode engine use the template engine instead of duplicating the latter's code. It required addition of another public implementation function to the template class, and the template engine does a bit more work than bbcode engine needs.
I went through the diff and added documentation everywhere it was missing as well.
Re: [RFC|Accepted] Improved template engine
I agree with Nils:AmigoJack wrote:So this issue with the current 3.0.x template system will be resolved then?Oleg wrote:the template engine expects $this to have template variables, which in the executor/renderer is not the case. Therefore I will be adding a "context" class which will store variables used during template evaluation.
Edit: just reviewed the GIT pull for /includes/template/filter.php and still see the old behaviour on line 449.My main interest is to use properties instead of variables everywhere in the rendered PHP code, so scope limitations won't affect file inclusions anymore. Thus included template files can also reference loop (template) variables, like
{postrow.POST_ID}
.
However, I think this feature is not as important as hooks, and right now the template engine RFC will be merged without it.naderman wrote:That does seem like a useful improvement. Changing the semantics for 3.0 is probably not a good idea, but we should get this into 3.1.
Re: [RFC|Merged] Improved template engine
Template engine has been merged. Further changes should go into separate tickets and/or RFCs.