Bug #2824

TemplateView can't be easily extended

Added by Bastian Waidelich over 12 years ago. Updated almost 11 years ago.

Must have
Target version:
Start date:
Due date:
% Done:


Estimated time:
Has patch:


When using custom views that extend F3\Fluid\View\TemplateView the required cache backend is not properly initialized because FLOW3s dependency injection is active only for configured classes, not their subclasses.
First I thought this was a bug in the DI mechanism. Meanwhile I'm not sure anymore and I don't know, how other DI-frameworks handle this issue.

A solution would be to extract cache handling into an AOP aspect which is active for subclasses too. Patch follows.


Fluid_2824.patch (11.5 KB) Fluid_2824.patch Bastian Waidelich, 2009-03-11 23:49

Updated by Bastian Waidelich over 12 years ago

Attached is a patch that extracts syntax tree cache handling into an AOP aspect. I've added an Interface to be able to activate the advice for all implementing classes.
To be able to deactivate caching during development, I've added a Settings.yaml - The caching aspect will only be active if Fluid.syntaxTreeCache.enable is set.
Note: I couldn't verify whether this patch breaks any unit tests, as my test runner does not work at the moment.
NoteĀ²: Please double-check the Patch. Windows creates diffs with CRLF line-endings


Updated by Sebastian Kurfuerst over 12 years ago

  • Status changed from New to Resolved
  • Assignee set to Sebastian Kurfuerst

committed :-) Thanks Bastian!

Also available in: Atom PDF