Issue Task Closed

#78749Make 7.6 Fluid capable of compiling ViewHelpers w/o CompilableInterface

Claus Due 11/19/16, 10:34 updated 01/21/18, 18:19

Description

As a follow-up / cross-version compatibility concern I suggest changing the template compiling on Fluid on 7.6 LTS so it no longer (exclusively) depends on the presence of the CompilableInterface.

The reasons are:

  • The Interface is merged with the plain ViewHelperInterface on TYPO3v8 and Fluid standalone (on TYPO3v8 the CompilableInterface is an alias, in Fluid standalone it no longer exists).
  • Fluid ViewHelpers which can now compile on both versions since https://review.typo3.org/#/c/50676/ would need to implement an interface that is deprecated on one version.
  • Fluid is technically capable of compiling ViewHelpers by checking if the compile() method exists; as a second decision after checking if the CompilableInterface exists

This can be achieved without breaking things – and it does not imply any changes to core ViewHelpers. On 7.6 those ViewHelpers will still use the interface – on TYPO3v8+ they no longer use it and instead assume compilable.

Goal of the change:

  • Allowing third party ViewHelpers to not implement CompilableInterface but instead implement a compile() method and get the same functionality.

Reviews 1