[TYPO3-mvc] !!! FYI: Committed big refactoring of Fluid; v4 and v5 are now in sync again

Sebastian Kurfürst sebastian at typo3.org
Mon Jul 12 22:25:07 CEST 2010


Hello everybody,

today I have done a major cleanup of Fluid Trunk in v4 - I backported
all the nice changes we have done in v5 to v4. There are some breaking
changes, but I think they only occur in very rare edge-cases.
There is one thing which is important, though: If you copied the
f:if-ViewHelper and modified it to work with your own conditions, *it
will not work anymore*, as you have used an internal API by that.
However, we have created a new ViewHelper base class
Tx_Fluid_Core_ViewHelper_ConditionViewHelper, which does all the hard
work. Check out the if-ViewHelper, you'll see how easy it is now to
write a custom comparison ViewHelper:
https://svn.typo3.org/TYPO3v4/CoreProjects/MVC/fluid/trunk/Classes/ViewHelpers/IfViewHelper.php

Another really nice change is that sections can now be rendered
recursively :-)

The full ChangeLog follows.

Greets,
Sebastian

Fluid in v5 and v4 are now synchronized again!

[+FEATURE] Fluid: The TemplateVariableContainer now provides a method to
retrieve all variables.
[~TASK] Fluid (Core): Introduced a RenderingContextInterface to more
cleanly decouple Fluid's rendering context from the TypoScript rendering
context. Note that view helpers (and other code) should now refer to
that interface instead of the concrete Fluid implementation!
[!!!][+BUGFIX] Fluid (Core): Refactored all Condition-ViewHelpers like
f:if, f:security.if* to use a newly created base class
F3\Fluid\Core\ViewHelper\ConditionViewHelper. This greatly simplifies
the implementation of custom conditions. However, THIS IS A BREAKING
CHANGE in case you copied the f:if ViewHelper to create a custom
condition ViewHelper, as the internal workings changed. Please check the
new f:if ViewHelper to see how to adjust your ViewHelper -- you
basically just have to throw away a lot of code. Resolves #8824.
[!!!][-API] Fluid (TemplateView): Removed renderSection() and
renderWithLayout() from public API in Tx_Fluid_View_TemplateView, as
this should only be called from inside Fluid.
[!!!][TASK] Fluid (ViewHelpers): the <f:section />-ViewHelper now does
NOT render itself anymore when encountered in a normal template.
Example: Before the change, the template "before <f:section name='...'>
middle </f:section> after" was rendered as "before middle after", but
now it is only rendered as "before after". Although this is a breaking
change, it is quite unlikely that anybody relied on this behavior, as it
was inconsistent beforehand.
[TASK] Fluid (TemplateView): Major refactoring of the layout, partial
and section rendering mechanism. This also induces a speedup as
retundant rendering is eliminated.
[+FEATURE] Fluid (ViewHelpers): The <f:render>-ViewHelper can be now
used to render sections in the same partial and template. In these
cases, all arguments need to be specified explicitely. Additionally, it
can now be used to render a section recursively.
[~TASK] Fluid (Core): Removed some non-API-methods which were never called.


More information about the TYPO3-project-typo3v4mvc mailing list