Fluid ViewHelper Incubator

The purpose of this project is to collect custom ViewHelpers and to have a central place for discussions.
If a ViewHelper is considered important and stable enough¹, we can integrate it to the core distribution of Fluid.
Besides, the latest collection of incubator ViewHelpers will be always available as one v4 Extension and FLOW3 Package (see Folder structure).

Suggest new ViewHelpers

If you want to provide your own custom ViewHelper, there are two ways to go:
  1. Create an issue at http://forge.typo3.org/projects/package-viewhelperincubator/issues/new set the Tracker to "Suggestion", add some descriptive words and - if possible - upload patch(es) or PHP file(s)
  2. If you're not member of the project yet, hit the "Join Project" link in the Members section at http://forge.typo3.org/projects/package-viewhelperincubator, checkout the whole project (see Folder structure) and commit the files directly to the repository.

It would save us a lot of work, if you could already provide versions for v5 and v4. Even better if they have Unit tests too.
The migration from v4 to v5 vice versa is mostly very easy. I've added Christians Calculation ViewHelper as an example:
https://svn.typo3.org/FLOW3/Packages/ViewhelperIncubator/CalculationViewHelper/_Extension/trunk/CalculationViewHelper.php (v4)
https://svn.typo3.org/FLOW3/Packages/ViewhelperIncubator/CalculationViewHelper/_Package/trunk/CalculationViewHelper.php (v5)

Suggest changes to existing core ViewHelpers

Please keep sending Core ViewHelper related bug reports and feature requests to the Fluid package at http://forge.typo3.org/projects/package-fluid/issues/new
If we can't yet get the changes into the core, we might create a copy of the respective ViewHelper in the Incubator and apply the patch there.
Example:
There are some requests about extending the for view helper. We'll copy the for view helper to the Incubator project. Then we can apply the changes and use/test the new view helper already. Once the detailed implementation is clear and the solution seems good enough, we might incorporate the changes back to the core for VH and all you'll have to do is to remove the custom vh namespace in your template.

Folder structure

The incubator comes with two "Distributions". One v4 extension and one v5 package.
The latest versions of the distributions are located in
_Extension/trunk/ and _Package/trunk/
They include the basic extension/package skeleton and links to trunks of the ViewHelpers via svn-externals.
If you want to add a VH, create a new folder with the ViewHelper name (UpperCamelCase) in the root of the Repository.
It should contain at least one of the subfolders "_Extension" or "_Package". In there you should add a "trunk" folder (to enable branching) which contains the VH PHP Class and the Unit Testcase.
Example:

_Extension
_Package
CalculationViewHelper
MyNewViewHelper
  _Extension
    trunk
      MyNewViewHelper.php
      MyNewViewHelperTest.php
  _Package
    trunk
      MyNewViewHelper.php
      MyNewViewHelperTest.php

We'll take care of the svn-externals linking.

Note: Please keep in mind, that there most definitely will be breaking changes in VH of the incubator. If you decide to use the incubator extension/package in a production environment, make sure to test it thoroughly and be careful with updates!

¹ We still have to define some general conditions for a stable ViewHelper (must have Unit Tests with a certain Code coverage, must be documented, must follow the CGL, must not violate the MVC concept, ...)