[TASK] Fluid: Fix missing classes 91/53991/3
authorBenni Mack <benni@typo3.org>
Thu, 7 Sep 2017 12:20:48 +0000 (14:20 +0200)
committerBenni Mack <benni@typo3.org>
Sat, 9 Sep 2017 10:40:32 +0000 (12:40 +0200)
When TYPO3 v8.0 switched to Fluid standalone, the RootNode
class was removed but the references were kept and done via
class aliases.

The Fluid standalone class should be used instead of the
class alias.

Resolves: #82335
Releases: master, 8.7
Change-Id: I50f74b71b86fcc347dc6bffbde052e6e2adbc842
Reviewed-on: https://review.typo3.org/53991
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/fluid/Classes/Core/Widget/AbstractWidgetViewHelper.php
typo3/sysext/fluid/Classes/Core/Widget/WidgetContext.php
typo3/sysext/fluid/Classes/ViewHelpers/RenderChildrenViewHelper.php
typo3/sysext/fluid/Tests/Unit/Core/Widget/AbstractWidgetViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/Core/Widget/WidgetContextTest.php

index d2bdc15..d5db37a 100644 (file)
@@ -144,7 +144,7 @@ abstract class AbstractWidgetViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper
      */
     public function setChildNodes(array $childNodes)
     {
-        $rootNode = $this->objectManager->get(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\RootNode::class);
+        $rootNode = $this->objectManager->get(\TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\RootNode::class);
         foreach ($childNodes as $childNode) {
             $rootNode->addChildNode($childNode);
         }
index a0cdb2c..337d667 100644 (file)
@@ -28,7 +28,7 @@ namespace TYPO3\CMS\Fluid\Core\Widget;
 class WidgetContext
 {
     /**
-     * Uniquely idenfies a Widget Instance on a certain page.
+     * Uniquely identifies a Widget Instance on a certain page.
      *
      * @var string
      */
@@ -60,7 +60,7 @@ class WidgetContext
      * The child nodes of the Widget ViewHelper.
      * Only available inside non-AJAX requests.
      *
-     * @var \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\RootNode
+     * @var \TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\RootNode
      * @transient
      */
     protected $viewHelperChildNodes;
@@ -240,17 +240,17 @@ class WidgetContext
     }
 
     /**
-     * @param \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\RootNode $viewHelperChildNodes
+     * @param \TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\RootNode $viewHelperChildNodes
      * @param \TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface $viewHelperChildNodeRenderingContext
      */
-    public function setViewHelperChildNodes(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\RootNode $viewHelperChildNodes, \TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface $viewHelperChildNodeRenderingContext)
+    public function setViewHelperChildNodes(\TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\RootNode $viewHelperChildNodes, \TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface $viewHelperChildNodeRenderingContext)
     {
         $this->viewHelperChildNodes = $viewHelperChildNodes;
         $this->viewHelperChildNodeRenderingContext = $viewHelperChildNodeRenderingContext;
     }
 
     /**
-     * @return \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\RootNode
+     * @return \TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\RootNode
      */
     public function getViewHelperChildNodes()
     {
index 61451c1..f92bb57 100644 (file)
@@ -70,7 +70,7 @@ class RenderChildrenViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\Abstract
     }
 
     /**
-     * @return \TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\RootNode
+     * @return \TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\RootNode
      */
     protected function getWidgetChildNodes()
     {
index fe1683e..b4ae07d 100644 (file)
@@ -137,7 +137,7 @@ class AbstractWidgetViewHelperTest extends \TYPO3\TestingFramework\Core\Unit\Uni
         $rootNode->expects($this->at(0))->method('addChildNode')->with($node1);
         $rootNode->expects($this->at(1))->method('addChildNode')->with($node2);
         $rootNode->expects($this->at(2))->method('addChildNode')->with($node3);
-        $this->objectManager->expects($this->once())->method('get')->with(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\RootNode::class)->will($this->returnValue($rootNode));
+        $this->objectManager->expects($this->once())->method('get')->with(\TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\RootNode::class)->will($this->returnValue($rootNode));
         $renderingContext = $this->createMock(\TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface::class);
         $this->viewHelper->_set('renderingContext', $renderingContext);
         $this->widgetContext->expects($this->once())->method('setViewHelperChildNodes')->with($rootNode, $renderingContext);
index c0c1d08..7a0b901 100644 (file)
@@ -115,7 +115,7 @@ class WidgetContextTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
      */
     public function viewHelperChildNodesCanBeReadAgain()
     {
-        $viewHelperChildNodes = $this->createMock(\TYPO3\CMS\Fluid\Core\Parser\SyntaxTree\RootNode::class);
+        $viewHelperChildNodes = $this->createMock(\TYPO3Fluid\Fluid\Core\Parser\SyntaxTree\RootNode::class);
         $renderingContext = $this->createMock(\TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface::class);
         $this->widgetContext->setViewHelperChildNodes($viewHelperChildNodes, $renderingContext);
         $this->assertSame($viewHelperChildNodes, $this->widgetContext->getViewHelperChildNodes());