[!!!][TASK] Remove deprecated code from ext:fluid 95/52495/3
authorWouter Wolters <typo3@wouterwolters.nl>
Tue, 18 Apr 2017 21:55:04 +0000 (23:55 +0200)
committerBenni Mack <benni@typo3.org>
Wed, 19 Apr 2017 20:46:48 +0000 (22:46 +0200)
Resolves: #80707
Releases: master
Change-Id: I694b5df5032e82b807da1e56141e52276068838c
Reviewed-on: https://review.typo3.org/52495
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/core/Documentation/Changelog/master/Breaking-80700-DeprecatedFunctionalityRemoved.rst
typo3/sysext/fluid/Classes/Core/Rendering/RenderingContext.php
typo3/sysext/fluid/Tests/Unit/Core/Rendering/RenderingContextTest.php

index 9453ab5..6e03cd5 100644 (file)
@@ -76,6 +76,10 @@ The following PHP class methods that have been previously deprecated for v8 have
 * TYPO3\CMS\Core\Utility\GeneralUtility::strtolower()
 * TYPO3\CMS\Core\Utility\GeneralUtility::strtoupper()
 * TYPO3\CMS\Core\Utility\GeneralUtility::xmlGetHeaderAttribs()
+* TYPO3\CMS\Fluid\Core\Rendering\RenderingContext->getObjectManager()
+* TYPO3\CMS\Fluid\Core\Rendering\RenderingContext->getTemplateVariableContainer()
+* TYPO3\CMS\Fluid\Core\Rendering\RenderingContext->injectObjectManager()
+* TYPO3\CMS\Fluid\Core\Rendering\RenderingContext->setLegacyMode()
 * TYPO3\CMS\Lang\LanguageService->addModuleLabels()
 * TYPO3\CMS\Lang\LanguageService->getParserFactory()
 * TYPO3\CMS\Lang\LanguageService->makeEntities()
index e7d5832..ffc27cc 100644 (file)
@@ -45,15 +45,6 @@ class RenderingContext extends \TYPO3Fluid\Fluid\Core\Rendering\RenderingContext
     protected $templateVariableContainer;
 
     /**
-     * Object manager which is bubbled through. The ViewHelperNode cannot get an ObjectManager injected because
-     * the whole syntax tree should be cacheable
-     *
-     * @var \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
-     * @deprecated since TYPO3 v8, will be removed in TYPO3 v9
-     */
-    protected $objectManager;
-
-    /**
      * Controller context being passed to the ViewHelper
      *
      * @var \TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext
@@ -61,23 +52,6 @@ class RenderingContext extends \TYPO3Fluid\Fluid\Core\Rendering\RenderingContext
     protected $controllerContext;
 
     /**
-     * Use legacy behavior? Can be overridden using setLegacyMode().
-     *
-     * @deprecated since TYPO3 v8, will be removed in TYPO3 v9
-     * @var bool
-     */
-    protected $legacyMode = false;
-
-    /**
-     * @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
-     * @deprecated since TYPO3 v8, will be removed in TYPO3 v9
-     */
-    public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager)
-    {
-        $this->objectManager = $objectManager;
-    }
-
-    /**
      * @param \TYPO3Fluid\Fluid\Core\ViewHelper\ViewHelperVariableContainer $viewHelperVariableContainer
      */
     public function injectViewHelperVariableContainer(\TYPO3Fluid\Fluid\Core\ViewHelper\ViewHelperVariableContainer $viewHelperVariableContainer)
@@ -146,47 +120,6 @@ class RenderingContext extends \TYPO3Fluid\Fluid\Core\Rendering\RenderingContext
     }
 
     /**
-     * Set legacy compatibility mode on/off by boolean.
-     * If set to FALSE, the ViewHelperResolver will only load a limited sub-set of ExpressionNodes,
-     * making Fluid behave like the legacy version of the CMS core extension.
-     *
-     * @deprecated since TYPO3 v8, will be removed in TYPO3 v9
-     * @param bool $legacyMode
-     */
-    public function setLegacyMode($legacyMode)
-    {
-        GeneralUtility::logDeprecatedFunction();
-        $this->legacyMode = $legacyMode;
-    }
-
-    /**
-     * Returns the object manager. Only the ViewHelperNode should do this.
-     *
-     * @deprecated since TYPO3 v8, will be removed in TYPO3 v9
-     * @return \TYPO3\CMS\Extbase\Object\ObjectManagerInterface
-     */
-    public function getObjectManager()
-    {
-        return $this->objectManager;
-    }
-
-    /**
-     * Get the template variable container (DEPRECATED; use getVariableProvider instead)
-     *
-     * @deprecated since TYPO3 CMS 8, will be removed in TYPO3 CMS 9 - use getVariableProvider instead
-     * @see getVariableProvider
-     * @return \TYPO3\CMS\Fluid\Core\ViewHelper\TemplateVariableContainer The Template Variable Container
-     */
-    public function getTemplateVariableContainer()
-    {
-        GeneralUtility::deprecationLog(
-            'getTemplateVariableContainer is deprecated since TYPO3 CMS 8, will be removed in TYPO3 CMS 9' .
-            ' - use getVariableProvider instead'
-        );
-        return $this->variableProvider;
-    }
-
-    /**
      * Get the controller context which will be passed to the ViewHelper
      *
      * @return \TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext The controller context to set
index 46fc15e..0028396 100644 (file)
@@ -38,15 +38,6 @@ class RenderingContextTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCas
     /**
      * @test
      */
-    public function getObjectManagerReturnsObjectManagerPropertyValue()
-    {
-        $this->renderingContext->_set('objectManager', 'test');
-        $this->assertEquals('test', $this->renderingContext->getObjectManager());
-    }
-
-    /**
-     * @test
-     */
     public function setControllerContextWithSubpackageKeySetsExpectedControllerContext()
     {
         $renderingContext = $this->getMockBuilder(RenderingContextFixture::class)