[!!!][TASK] Remove RenderingContextAwareInterface 06/39206/3
authorChristian Müller <christian@kitsunet.de>
Sat, 2 May 2015 16:59:48 +0000 (18:59 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 2 May 2015 19:09:18 +0000 (21:09 +0200)
The RenderingContextAwareInterface was never used and should therefore
be removed as it introduces unnecessary overhead in property access of
Fluid. It also prevents further optmization of the template rendering
process.

This can potentially be breaking if your code implements the interface.

Resolves: #66754
Releases: master
Change-Id: I009049582d02a79e8ee084db5bf7010d7139fcb4
Reviewed-on: http://review.typo3.org/39206
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/compatibility6/Migrations/Code/ClassAliasMap.php
typo3/sysext/compatibility6/Migrations/Code/LegacyClassesForIde.php
typo3/sysext/core/Documentation/Changelog/master/Breaking-66754-RemoveRenderingContextAwareInterface.rst [new file with mode: 0644]
typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/ObjectAccessorNode.php
typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/RenderingContextAwareInterface.php [deleted file]

index 87aae82..d9d143a 100644 (file)
@@ -605,7 +605,6 @@ return array(
        'Tx_Fluid_Core_Parser_SyntaxTree_BooleanNode' => \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\BooleanNode::class,
        'Tx_Fluid_Core_Parser_SyntaxTree_NodeInterface' => \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\NodeInterface::class,
        'Tx_Fluid_Core_Parser_SyntaxTree_ObjectAccessorNode' => \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ObjectAccessorNode::class,
-       'Tx_Fluid_Core_Parser_SyntaxTree_RenderingContextAwareInterface' => \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\RenderingContextAwareInterface::class,
        'Tx_Fluid_Core_Parser_SyntaxTree_RootNode' => \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\RootNode::class,
        'Tx_Fluid_Core_Parser_SyntaxTree_TextNode' => \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\TextNode::class,
        'Tx_Fluid_Core_Parser_SyntaxTree_ViewHelperNode' => \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\ViewHelperNode::class,
index 767fdef..d530a8d 100644 (file)
@@ -3014,11 +3014,6 @@ class Tx_Fluid_Core_Parser_SyntaxTree_ObjectAccessorNode extends \TYPO3\CMS\Flui
 /**
  * @deprecated since 6.0, removed since 7.0
  */
-interface Tx_Fluid_Core_Parser_SyntaxTree_RenderingContextAwareInterface extends \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\RenderingContextAwareInterface {}
-
-/**
- * @deprecated since 6.0, removed since 7.0
- */
 class Tx_Fluid_Core_Parser_SyntaxTree_RootNode extends \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\RootNode {}
 
 /**
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-66754-RemoveRenderingContextAwareInterface.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-66754-RemoveRenderingContextAwareInterface.rst
new file mode 100644 (file)
index 0000000..ff2a2aa
--- /dev/null
@@ -0,0 +1,23 @@
+========================================================
+Breaking: #66754 - Remove RenderingContextAwareInterface
+========================================================
+
+Description
+===========
+
+The `RenderingContextAwareInterface` allowed objects to get the `RenderingContext` set while being
+accessed from inside a Fluid template. This makes optimization of variable access in Fluid difficult
+and seems to be an unused feature. Therefore it should be removed.
+
+Impact
+======
+
+For implementations of `RenderingContextAwareInterface` the change breaks without any simple replacement.
+Functionality would have to be replicated in userland code. But as there are no known implementations
+the expected impact is rather low.
+
+
+Breaking interface changes
+--------------------------
+
+* The `RenderingContextAwareInterface` has been removed. There is no replacement.
\ No newline at end of file
index ecc9ea4..a4ba127 100644 (file)
@@ -89,10 +89,6 @@ class ObjectAccessorNode extends \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\Abstrac
                        } else {
                                $subject = $propertyValue;
                        }
-
-                       if ($subject instanceof \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\RenderingContextAwareInterface) {
-                               $subject->setRenderingContext($renderingContext);
-                       }
                }
                return $subject;
        }
diff --git a/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/RenderingContextAwareInterface.php b/typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/RenderingContextAwareInterface.php
deleted file mode 100644 (file)
index 5b7294c..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-namespace TYPO3\CMS\Fluid\Core\Parser\SyntaxTree;
-
-/*                                                                        *
- * This script is backported from the TYPO3 Flow package "TYPO3.Fluid".   *
- *                                                                        *
- * It is free software; you can redistribute it and/or modify it under    *
- * the terms of the GNU Lesser General Public License, either version 3   *
- *  of the License, or (at your option) any later version.                *
- *                                                                        *
- * The TYPO3 project - inspiring people to share!                         *
- *                                                                        */
-
-/**
- * Interface for objects which are aware of Fluid's rendering context. All objects
- * marked with this interface will get the current rendering context injected
- * by the ObjectAccessorNode on trying to evaluate them.
- */
-interface RenderingContextAwareInterface {
-
-       /**
-        * Sets the current rendering context
-        *
-        * @param \TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext
-        * @return void
-        */
-       public function setRenderingContext(\TYPO3\CMS\Fluid\Core\Rendering\RenderingContextInterface $renderingContext);
-
-}