TYPO3 13 is based on Fluid 4. All older TYPO3 versions will stay on Fluid 2. We're skipping Fluid version 3 entirely, as an older development branch originally designated for that version never reached a stable release.
Development Strategy
When we started development on the new major version, we set an important goal for ourselves: to deliver meaningful changes to Fluid without breaking any user-facing API or templates. As a result, we adopted a 3-step deprecation strategy to give Fluid users advance notice of any changes that might affect their code.
- In recent minor versions of Fluid 2, we introduced soft deprecations (using the @deprecated annotation in DocBlock comments) and provided a detailed changelog.
- In Fluid 4, we log deprecation notices in addition to the annotations, and provide a separate changelog. Recently deprecated code still works and will not be removed.
- Only in Fluid 5 will we remove previously deprecated code.
This strategy makes the jump from Fluid 2 to Fluid 4 a straightforward migration for all users.
Backported Features
A benefit of our deprecation strategy is that most new features have been backported to Fluid 2, making them available to older TYPO3 instances. For example:
- Fluid 2.11 (released in April) added five new ViewHelpers:
- <f:replace> for string replacements
- <f:join> and <f:split> for string-array conversions
- <f:first> and <f:last> to get the first/last element in an array
- Fluid 2.12 (released in June) added the <f:constant> ViewHelper and allowed arbitrary arguments for all tag-based ViewHelpers, such as all <f:form.*> ViewHelpers
- Fluid 2.15 (released in August) simplified the ViewHelper API by integrating the contentArgumentName feature from CompileWithContentArgumentAndRenderStatic into AbstractViewHelper, making it available to all ViewHelpers
We’ve also overhauled the ViewHelper reference documentation. It contains more information than before and is still based on the actual ViewHelper code — which guarantees that it’s always up-to-date.
Exclusive Features
For some features, it wasn’t feasible to backport them to older Fluid or TYPO3 versions. These are exclusive to TYPO3 13 and Fluid 4:
- The <f:comment> ViewHelper now ignores syntax errors, which allows commenting-out invalid Fluid code during development. Finally!
- true, false and null are now part of the Fluid syntax, which allows using them as variables in templates, like {true}.
- Tag-based ViewHelpers, such as <f:form.*>, now support HTML5-style boolean attributes by providing a boolean as value: <f:form.textfield readonly=”{isReadonly}” /> will omit the readonly attribute altogether if {isReadonly} is set to false.
Important Changes
Although your Fluid-related code will likely just keep working in TYPO3 13, we encourage TYPO3 users to review the upcoming Fluid changes early, especially:
- renderStatic() in ViewHelpers and the associated traits have been deprecated. We encourage all users to switch to the non-static render() method as the primary rendering method for all ViewHelpers. renderStatic() will still work in Fluid v4, but won’t be called in Fluid v5.
- Use the new ViewFactory when creating your own View object in TYPO3 13. Don’t create your own StandaloneView or TemplateView because these are now deprecated.
- We recommend using the latest Fluid 2 version in your TYPO3 12 or lower projects to take advantage of most new features. This will also simplify your future migration to TYPO3 13 and Fluid 4.
Looking Ahead
We believe that this new major version is a huge step forward for Fluid, as we’ve managed to clean up a lot under the hood. The deprecations will allow us to streamline and simplify even more in the near future, paving the way for powerful new features in the coming years. We are very happy with the progress we have made so far and we hope that you will appreciate the new Fluid features in your TYPO3 projects.
Last but not least we want to give a big shout out to Claus Due,who maintained Fluid before the current team took over. We greatly value his feedback and are grateful for the inspiring ideas he developed with his Fluid 3 prototype. We still have them in the back of our heads and are thinking about the necessary steps to integrate them into Fluid in the future.
Check out the full Fluid 4 release notes.