[!!!][TASK] Remove deprecated web request class 81/64381/7
authorAlexander Schnitzler <git@alexanderschnitzler.de>
Fri, 1 May 2020 09:46:52 +0000 (11:46 +0200)
committerBenjamin Franzke <bfr@qbus.de>
Fri, 29 May 2020 20:20:34 +0000 (22:20 +0200)
The Web request class is removed in favor of Extbase's
base request object.

For this change, the testing framework has to be adapted
to use the base request object instead of the Web request
object.

Used composer command:
  composer req "typo3/testing-framework:^6.3.2" --dev

Releases: master
Resolves: #91525
Related: #91473
Change-Id: Iec6c5396de58b9bdb776d17c884242c42b335b12
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/64381
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Benni Mack <benni@typo3.org>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Benjamin Franzke <bfr@qbus.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Benjamin Franzke <bfr@qbus.de>
21 files changed:
composer.json
composer.lock
typo3/sysext/core/Documentation/Changelog/master/Breaking-91473-DeprecatedFunctionalityRemoved.rst
typo3/sysext/core/composer.json
typo3/sysext/extbase/Classes/Mvc/Request.php
typo3/sysext/extbase/Classes/Mvc/View/NotFoundView.php
typo3/sysext/extbase/Classes/Mvc/Web/ReferringRequest.php
typo3/sysext/extbase/Classes/Mvc/Web/Request.php [deleted file]
typo3/sysext/extbase/Classes/Mvc/Web/RequestBuilder.php
typo3/sysext/extbase/Tests/Functional/Mvc/Controller/ActionControllerArgumentTest.php
typo3/sysext/extbase/Tests/Functional/Mvc/Controller/ActionControllerTest.php
typo3/sysext/extbase/Tests/Functional/Mvc/Controller/ControllerArgumentsMappingTest.php
typo3/sysext/extbase/Tests/Functional/Mvc/Validation/ActionControllerValidationTest.php
typo3/sysext/extbase/Tests/Unit/Mvc/Web/Routing/UriBuilderTest.php
typo3/sysext/fluid/Classes/View/StandaloneView.php
typo3/sysext/fluid/Tests/Unit/Core/Widget/AbstractWidgetViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/Core/Widget/WidgetRequestHandlerTest.php
typo3/sysext/form/Classes/Domain/Finishers/RedirectFinisher.php
typo3/sysext/form/Classes/Domain/Model/FormDefinition.php
typo3/sysext/form/Classes/Domain/Runtime/FormRuntime.php
typo3/sysext/install/Configuration/ExtensionScanner/Php/ClassNameMatcher.php

index 7152b6d..269750a 100644 (file)
@@ -89,7 +89,7 @@
                "phpstan/phpstan": "^0.12.13",
                "rector/rector": "^0.7.14",
                "typo3/cms-styleguide": "~10.0.2",
-               "typo3/testing-framework": "^6.3.1"
+               "typo3/testing-framework": "^6.3.2"
        },
        "suggest": {
                "ext-gd": "GDlib/Freetype is required for building images with text (GIFBUILDER) and can also be used to scale images",
index 17cac2f..78cda27 100644 (file)
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "1f351aa9a64f76cd6a045f6c8ccbafee",
+    "content-hash": "1605f67bbe1b80aca437eb255af516e8",
     "packages": [
         {
             "name": "cogpowered/finediff",
         },
         {
             "name": "typo3/testing-framework",
-            "version": "6.3.1",
+            "version": "6.3.2",
             "source": {
                 "type": "git",
                 "url": "https://github.com/TYPO3/testing-framework.git",
-                "reference": "66973fd9f1cffb251d09b2ad13b7a788dd880b70"
+                "reference": "511ccae36eaaea19311199c88f1ea708f42994a0"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/TYPO3/testing-framework/zipball/66973fd9f1cffb251d09b2ad13b7a788dd880b70",
-                "reference": "66973fd9f1cffb251d09b2ad13b7a788dd880b70",
+                "url": "https://api.github.com/repos/TYPO3/testing-framework/zipball/511ccae36eaaea19311199c88f1ea708f42994a0",
+                "reference": "511ccae36eaaea19311199c88f1ea708f42994a0",
                 "shasum": ""
             },
             "require": {
                 "tests",
                 "typo3"
             ],
-            "time": "2020-05-28T15:04:49+00:00"
+            "time": "2020-05-29T18:24:18+00:00"
         }
     ],
     "aliases": [],
index c5faa55..3dcc4e8 100644 (file)
@@ -13,6 +13,7 @@ The following PHP classes that have been previously deprecated for v10 have been
 
 - :php:`\TYPO3\CMS\Backend\Template\DocumentTemplate`
 - :php:`\TYPO3\CMS\Extbase\Mvc\Controller\AbstractController`
+- :php:`\TYPO3\CMS\Extbase\Mvc\Web\Request`
 
 The following PHP interfaces that have been previously deprecated for v10 have been removed:
 
index a7b27d2..60cf915 100644 (file)
@@ -69,7 +69,7 @@
                "phpspec/prophecy": "^1.7.5",
                "phpstan/phpstan": "^0.12.13",
                "typo3/cms-styleguide": "~10.0.2",
-               "typo3/testing-framework": "^6.3.1"
+               "typo3/testing-framework": "^6.3.2"
        },
        "suggest": {
                "ext-fileinfo": "Used for proper file type detection in the file abstraction layer",
index cc31575..24c3237 100644 (file)
@@ -81,7 +81,7 @@ class Request implements RequestInterface
     /**
      * @var string The requested representation format
      */
-    protected $format = 'txt';
+    protected $format = 'html';
 
     /**
      * @var bool If this request has been changed and needs to be dispatched again
index 1325b8f..0db5074 100644 (file)
@@ -18,7 +18,7 @@ namespace TYPO3\CMS\Extbase\Mvc\View;
 use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Extbase\Mvc\Exception;
-use TYPO3\CMS\Extbase\Mvc\Web\Request;
+use TYPO3\CMS\Extbase\Mvc\Request;
 
 /**
  * The not found view - a special case.
index 2ea6bbe..59b4e21 100644 (file)
@@ -15,6 +15,8 @@
 
 namespace TYPO3\CMS\Extbase\Mvc\Web;
 
+use TYPO3\CMS\Extbase\Mvc\Request;
+
 /**
  * Represents a referring web request.
  */
diff --git a/typo3/sysext/extbase/Classes/Mvc/Web/Request.php b/typo3/sysext/extbase/Classes/Mvc/Web/Request.php
deleted file mode 100644 (file)
index dcdbb77..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-namespace TYPO3\CMS\Extbase\Mvc\Web;
-
-/**
- * Represents a web request.
- * @deprecated since TYPO3 10.2, will be removed in version 11.0.
- */
-class Request extends \TYPO3\CMS\Extbase\Mvc\Request
-{
-    /**
-     * @var string The requested representation format
-     */
-    protected $format = 'html';
-}
index c12efab..8f68ce3 100644 (file)
@@ -26,6 +26,7 @@ use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
 use TYPO3\CMS\Extbase\Mvc\Exception as MvcException;
 use TYPO3\CMS\Extbase\Mvc\Exception\InvalidActionNameException;
 use TYPO3\CMS\Extbase\Mvc\Exception\InvalidControllerNameException;
+use TYPO3\CMS\Extbase\Mvc\Request;
 use TYPO3\CMS\Extbase\Object\ObjectManagerInterface;
 use TYPO3\CMS\Extbase\Service\EnvironmentService;
 use TYPO3\CMS\Extbase\Service\ExtensionService;
@@ -180,7 +181,7 @@ class RequestBuilder implements SingletonInterface
     /**
      * Builds a web request object from the raw HTTP information and the configuration
      *
-     * @return \TYPO3\CMS\Extbase\Mvc\Web\Request The web request as an object
+     * @return \TYPO3\CMS\Extbase\Mvc\Request The web request as an object
      */
     public function build()
     {
@@ -215,7 +216,7 @@ class RequestBuilder implements SingletonInterface
             $baseUri .= TYPO3_mainDir;
         }
 
-        /** @var \TYPO3\CMS\Extbase\Mvc\Web\Request $request */
+        /** @var \TYPO3\CMS\Extbase\Mvc\Request $request */
         $request = $this->objectManager->get(Request::class);
         $request->setPluginName($this->pluginName);
         $request->setControllerExtensionName($this->extensionName);
index 8b15a7d..ce00083 100644 (file)
@@ -20,9 +20,9 @@ namespace TYPO3\CMS\Extbase\Tests\Functional\Mvc\Controller;
 use TYPO3\CMS\Core\Utility\ArrayUtility;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Extbase\Mvc\Exception\StopActionException;
+use TYPO3\CMS\Extbase\Mvc\Request;
 use TYPO3\CMS\Extbase\Mvc\RequestInterface;
 use TYPO3\CMS\Extbase\Mvc\ResponseInterface;
-use TYPO3\CMS\Extbase\Mvc\Web\Request;
 use TYPO3\CMS\Extbase\Mvc\Web\Response;
 use TYPO3\CMS\Extbase\Object\Container\Container;
 use TYPO3\CMS\Extbase\Object\ObjectManager;
index 8787bab..071c343 100644 (file)
@@ -18,8 +18,8 @@ declare(strict_types=1);
 namespace TYPO3\CMS\Extbase\Tests\Functional\Mvc\Controller;
 
 use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Extbase\Mvc\Request;
 use TYPO3\CMS\Extbase\Mvc\View\JsonView;
-use TYPO3\CMS\Extbase\Mvc\Web\Request;
 use TYPO3\CMS\Extbase\Mvc\Web\Response;
 use TYPO3\CMS\Extbase\Object\ObjectManager;
 use TYPO3\CMS\Extbase\Tests\Functional\Mvc\Controller\Fixture\Controller\TestController;
@@ -34,7 +34,7 @@ use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;
 class ActionControllerTest extends FunctionalTestCase
 {
     /**
-     * @var \TYPO3\CMS\Extbase\Mvc\Web\Request
+     * @var \TYPO3\CMS\Extbase\Mvc\Request
      */
     protected $request;
 
index 00ed2c1..ad8dd48 100644 (file)
@@ -22,7 +22,7 @@ use TYPO3\CMS\Core\Context\Context;
 use TYPO3\CMS\Core\Context\LanguageAspect;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
-use TYPO3\CMS\Extbase\Mvc\Web\Request;
+use TYPO3\CMS\Extbase\Mvc\Request;
 use TYPO3\CMS\Extbase\Mvc\Web\Response;
 use TYPO3\CMS\Extbase\Object\ObjectManager;
 use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;
@@ -33,7 +33,7 @@ use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;
 class ControllerArgumentsMappingTest extends FunctionalTestCase
 {
     /**
-     * @var \TYPO3\CMS\Extbase\Mvc\Web\Request
+     * @var \TYPO3\CMS\Extbase\Mvc\Request
      */
     protected $request;
 
index 7ff277f..819239e 100644 (file)
@@ -21,7 +21,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Extbase\Error\Error;
 use TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfigurationService;
 use TYPO3\CMS\Extbase\Mvc\Exception\StopActionException;
-use TYPO3\CMS\Extbase\Mvc\Web\Request;
+use TYPO3\CMS\Extbase\Mvc\Request;
 use TYPO3\CMS\Extbase\Mvc\Web\Response;
 use TYPO3\CMS\Extbase\Object\ObjectManager;
 use TYPO3\CMS\Extbase\Security\Cryptography\HashService;
index 45e77d4..8341e26 100644 (file)
@@ -24,7 +24,7 @@ use TYPO3\CMS\Extbase\Configuration\ConfigurationManager;
 use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
 use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
 use TYPO3\CMS\Extbase\Mvc\Exception\InvalidArgumentValueException;
-use TYPO3\CMS\Extbase\Mvc\Web\Request;
+use TYPO3\CMS\Extbase\Mvc\Request;
 use TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder;
 use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
 use TYPO3\CMS\Extbase\Service\EnvironmentService;
index b370b61..d2e2744 100644 (file)
@@ -18,7 +18,7 @@ namespace TYPO3\CMS\Fluid\View;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
 use TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext;
-use TYPO3\CMS\Extbase\Mvc\Web\Request;
+use TYPO3\CMS\Extbase\Mvc\Request;
 use TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder;
 use TYPO3\CMS\Extbase\Object\ObjectManager;
 use TYPO3\CMS\Extbase\Service\EnvironmentService;
@@ -61,7 +61,7 @@ class StandaloneView extends AbstractTemplateView
             $baseUri .= TYPO3_mainDir;
         }
 
-        /** @var \TYPO3\CMS\Extbase\Mvc\Web\Request $request */
+        /** @var \TYPO3\CMS\Extbase\Mvc\Request $request */
         $request = $this->objectManager->get(Request::class);
         $request->setRequestUri(GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL'));
         $request->setBaseUri($baseUri);
index 429df82..fc9d343 100644 (file)
@@ -18,7 +18,7 @@ declare(strict_types=1);
 namespace TYPO3\CMS\Fluid\Tests\Unit\Core\Widget;
 
 use TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext;
-use TYPO3\CMS\Extbase\Mvc\Web\Request;
+use TYPO3\CMS\Extbase\Mvc\Request;
 use TYPO3\CMS\Extbase\Mvc\Web\Response;
 use TYPO3\CMS\Extbase\Object\ObjectManagerInterface;
 use TYPO3\CMS\Extbase\Service\ExtensionService;
index 9926b2a..55ba17d 100644 (file)
@@ -17,8 +17,8 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\Core\Widget;
 
 use Prophecy\Argument;
 use TYPO3\CMS\Extbase\Mvc\Dispatcher;
+use TYPO3\CMS\Extbase\Mvc\Request;
 use TYPO3\CMS\Extbase\Mvc\Web\AbstractRequestHandler;
-use TYPO3\CMS\Extbase\Mvc\Web\Request;
 use TYPO3\CMS\Extbase\Mvc\Web\Response;
 use TYPO3\CMS\Extbase\Object\ObjectManager;
 use TYPO3\CMS\Fluid\Core\Widget\WidgetRequestBuilder;
index 8a692c2..6fbcd43 100644 (file)
@@ -40,7 +40,7 @@ class RedirectFinisher extends AbstractFinisher
     ];
 
     /**
-     * @var \TYPO3\CMS\Extbase\Mvc\Web\Request
+     * @var \TYPO3\CMS\Extbase\Mvc\Request
      */
     protected $request;
 
index 18c9b0d..10df9f6 100644 (file)
@@ -22,7 +22,7 @@ declare(strict_types=1);
 namespace TYPO3\CMS\Form\Domain\Model;
 
 use TYPO3\CMS\Core\Utility\ArrayUtility;
-use TYPO3\CMS\Extbase\Mvc\Web\Request;
+use TYPO3\CMS\Extbase\Mvc\Request;
 use TYPO3\CMS\Extbase\Mvc\Web\Response;
 use TYPO3\CMS\Extbase\Object\ObjectManagerInterface;
 use TYPO3\CMS\Extbase\Reflection\ObjectAccess;
@@ -200,7 +200,7 @@ use TYPO3\CMS\Form\Mvc\ProcessingRule;
  * ==========================
  *
  * In order to trigger *rendering* on a FormDefinition,
- * the current {@link \TYPO3\CMS\Extbase\Mvc\Web\Request} needs to be bound to the FormDefinition,
+ * the current {@link \TYPO3\CMS\Extbase\Mvc\Request} needs to be bound to the FormDefinition,
  * resulting in a {@link \TYPO3\CMS\Form\Domain\Runtime\FormRuntime} object which contains the *Runtime State* of the form
  * (such as the currently inserted values).
  *
index 77ab494..7dcace1 100644 (file)
@@ -34,7 +34,7 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Extbase\Error\Result;
 use TYPO3\CMS\Extbase\Mvc\Controller\Arguments;
 use TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext;
-use TYPO3\CMS\Extbase\Mvc\Web\Request;
+use TYPO3\CMS\Extbase\Mvc\Request;
 use TYPO3\CMS\Extbase\Mvc\Web\Response;
 use TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder;
 use TYPO3\CMS\Extbase\Object\ObjectManagerInterface;
@@ -110,7 +110,7 @@ class FormRuntime implements RootRenderableInterface, \ArrayAccess
     protected $formDefinition;
 
     /**
-     * @var \TYPO3\CMS\Extbase\Mvc\Web\Request
+     * @var \TYPO3\CMS\Extbase\Mvc\Request
      */
     protected $request;
 
index be1b9bf..f003c92 100644 (file)
@@ -1536,4 +1536,10 @@ return [
             'Breaking-91066-RemovedButtonUtility.rst',
         ],
     ],
+    'TYPO3\CMS\Extbase\Mvc\Web\Request' => [
+        'restFiles' => [
+            'Deprecation-89673-ExtbasesWebRequestAndWebResponse.rst',
+            'Breaking-91473-DeprecatedFunctionalityRemoved.rst',
+        ],
+    ],
 ];