Bug #2824

TemplateView can't be easily extended

Added by Bastian Waidelich over 6 years ago. Updated almost 5 years ago.

Status:Resolved Start date:2009-03-11
Priority:Must have Due date:
Assigned To:Sebastian Kurfuerst % Done:

0%

Category:-
Target version:-
Has patch: Affected Flow version:

Description

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 Magnifier (11.5 kB) Bastian Waidelich, 2009-03-11 23:49

Associated revisions

Revision 20ecdb60
Added by Sebastian Kurfuerst over 6 years ago

Fluid:
  • Fixed bug #2824: Caching of TemplateView is now handled in an aspect, and can be switched on or off.

History

#1 Updated by Bastian Waidelich over 6 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

#2 Updated by Sebastian Kurfuerst over 6 years ago

  • Status changed from New to Resolved
  • Assigned To set to Sebastian Kurfuerst

committed :-) Thanks Bastian!

Also available in: Atom PDF